Page 1 of 2

DCRTF very slow while closing

Posted: Thu Nov 07, 2013 4:24 pm
by jjelders
In the function below I show a helpscreen from a rtf-file.
The rtf-file has a size of about 10mb because there are screendumps in it.
The function opens the rtf in a short time but when I close the screen it takes about 20 seconds before my application reacts again. After closing the screen the cpu usage rises to about 80%.
Somebody knows why this happens?

FUNCTION Displayhelp()
**********************
*Laat help-scherm zien

LOCAL GetList:={}, GetOptions, cMemo, oRTF:=NIL

cMemo:=MemoRead('help.rtf')

@ 0,0 DCRTF OBJECT oRTF SIZE 100,30 VAR cMemo ;
SCROLLBARS XBP_SCROLLBAR_HORIZ + XBP_SCROLLBAR_VERT ;
APPEARANCE XBP_APPEARANCE_3D ;
RESIZE DCGUI_RESIZE_RESIZEONLY

DCGETOPTIONS RESIZE
DCREAD GUI FIT TITLE "Helpinformatie" OPTIONS GetOptions
RETURN NIL

Re: DCRTF very slow while closing

Posted: Thu Nov 07, 2013 4:38 pm
by bwolfsohn
two thoughts..

the program might be doing garbage collection..

do you have real-time anti-virus active in the directory of the rtf file ?

Re: DCRTF very slow while closing

Posted: Fri Nov 08, 2013 3:12 pm
by jjelders
Garbage collection could be but always at the same spot?
I have AVG antivirus now but also Microsoft essentials has the problem.
I do not think the antivirus is the problem because on other machines I have the same problem.

Re: DCRTF very slow while closing

Posted: Fri Nov 08, 2013 9:44 pm
by Auge_Ohr
hi,

did same happens with RFT when using WordPad.EXE ?
did you tray c:\ALASKA\XPPW32\Source\samples\activex\editor\rtf.prg

Re: DCRTF very slow while closing

Posted: Sat Nov 09, 2013 2:36 am
by jjelders
With Wordpad.exe no problems with loading and closing.

With rtf.prg (editor.exe) the rtf-file loads quickly in the window but after that the program does not react for 18 seconds. Closing the exe is fast.

Re: DCRTF very slow while closing

Posted: Sat Nov 09, 2013 8:34 am
by bwolfsohn
jjelders wrote:With Wordpad.exe no problems with loading and closing.

With rtf.prg (editor.exe) the rtf-file loads quickly in the window but after that the program does not react for 18 seconds. Closing the exe is fast.
sounds like xbase++ is processing the rtf contents for that 18 seconds..

Re: DCRTF very slow while closing

Posted: Sat Nov 09, 2013 9:10 am
by rdonnay
Send me your application code with your RTF file.

I will see what I can do.

Re: DCRTF very slow while closing

Posted: Sun Nov 10, 2013 3:04 pm
by jjelders
Hi Roger,

Included you will find a zipfile with the program, the rtf-file and some athert data to run it.

Thanks in advance

Hans Jelders

Re: DCRTF very slow while closing

Posted: Mon Nov 11, 2013 8:11 am
by rdonnay
I don't understand what your program is supposed to do.

You didn't include the source code.

When I run zwfb.exe, it opens an EXCEL file.

What does this have to do with your RTF problem?

Re: DCRTF very slow while closing

Posted: Mon Nov 11, 2013 4:42 pm
by jjelders
A short time ago I replied to your message.
I do not see it in the forum.
So I sent the prg once again but now in zip format.