FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour too busy to response
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
too busy to response
Posted: Sun Dec 22, 2019 07:50 PM
hi,

i try to use a GET MULTILINE to show "Output" under GUI

Code (fw): Select all Collapse
PROCEDURE SetStatusText( cData )
LOCAL ControlHandle
   cStatusBox += cData
   #IFDEF Use_Gui
      #IFDEF __HMG__
         ControlHandle := GetControlHandle( "StatusBox", "Main" )
      #ELSE
         ControlHandle := oStatusBox:hwnd
      #ENDIF
   #ENDIF

   IF !EMPTY( ControlHandle )
      #IFDEF Use_Gui
         #IFDEF __HMG__
            SendMessage(ControlHandle  ,;
                  WM_SETTEXT     ,;
                  LEN(cStatusBox),;
                  cStatusBox      )

*           SetProperty("Main","StatusBox","CaretPos", -1 )
*           Main.StatusBox.CaretPos := - 1
         #ELSE
            oStatusBox:cText := cStatusBox
            oStatusBox:GoBottom()
         #ENDIF
         InvalidateRect( ControlHandle, NIL, .F. )
      #ENDIF
   ENDIF
   cStatusBox += CRLF
RETURN

i do assign "growing" String direct to o:cText and show it with Scroll Effect.

under HMG i have to use API else Memory goes up until crash while FiveWin is Stable :-)
but in both Version "Output" will get slower with every line ... :-) ... hm

now i have a BIG Problem with HMG and Fivewin when "Focus is lost". (click on other App)
HMG and FiveWin App does run but no "Output" ("no response" Timeout Problem) any more until End :-)

App does read file, analyze it, new align it, write new file
both work with "Output" to GET Object ... and no "sleep"

without "OutPut" (VERBOSE=NO) it just take < 5 Sec
HMG and FiveWin need Minutes with (not optimized) GUI "Output" which is "normal"

neverless i like to ask is there a Way to "Speed" up "OutPut" :-)
what can i do against "no response" Timeout Problem :-)

---

it is a old Cl*pper code and does not use RAM> 640 KB as we have now.
it also use Function Code which are not Thread safe.
but i don't want to revise hole Cl*pper Code ... only make it faster in GUI
greeting,

Jimmy
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Re: too busy to response
Posted: Tue Dec 24, 2019 06:43 AM
got the Solution

Code (fw): Select all Collapse
   hb_IdleSleep( 0.01 )
   SysRefresh()     // Let Windows process

as i say there was no time for Windows.
hb_IdleSleep( 0.01 ) does not help but SysRefresh() ... which also need time

but now i can play Solitar in Foreground while FW App work in Backgound and does "Output" hole time :-)

have a nice Xmas
Jimmy
greeting,

Jimmy

Continue the discussion