Delphi-PRAXiS
Seite 4 von 4   « Erste     234   

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Sonstige Fragen zu Delphi (https://www.delphipraxis.net/19-sonstige-fragen-zu-delphi/)
-   -   Delphi Ursache für hängende Applikation herausfinden (https://www.delphipraxis.net/214551-ursache-fuer-haengende-applikation-herausfinden.html)

jaenicke 1. Feb 2024 15:37

AW: Ursache für hängende Applikation herausfinden
 
You are right, but those optimization details do not match the problem. The problem is, that the main thread is blocked. So a timer won't work better.

As I wrote there are only two possibilities:
- A bigger refactoring, which includes moving the long running operations to a background thread. Of course this can be a really big task.
- Or using a status window, which runs in its own thread, so it can be displayed and updated even when the main thread is fully blocked (as I do it with my MTCL). This is a simple and quick solution (which of course does not solve the design flaws).

Bodenseematze 27. Feb 2024 07:16

AW: Ursache für hängende Applikation herausfinden
 
Auch wenn es wieder eine Weile her ist - ich wollte noch kurz berichten, was ich jetzt schlussendlich unternommen habe...

Zitat:

Zitat von jaenicke (Beitrag 1532892)
As I wrote there are only two possibilities:
- A bigger refactoring, which includes moving the long running operations to a background thread. Of course this can be a really big task.
- Or using a status window, which runs in its own thread, so it can be displayed and updated even when the main thread is fully blocked (as I do it with my MTCL). This is a simple and quick solution (which of course does not solve the design flaws).

Und ich habe die dritte Möglichkeit gewählt :-D

Ich habe das Fenster komplett eliminiert und mir die einzelnen durchgeführten Arbeitsschritte, die so lange gedauert haben, genauer angeschaut.
Das habe ich dann optimiert und teilweise auch auf den Datenbankserver verlagert.
Dadurch hat sich die Laufzeit des Codes drastisch reduziert - es ist zwar immer noch keine "Nullzeit", aber zumindest soweit erträglich, dass ich kein "Wartefenster" und auch kein riesiges Refactoring mehr brauche... :wink:


Alle Zeitangaben in WEZ +1. Es ist jetzt 01:38 Uhr.
Seite 4 von 4   « Erste     234   

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz