Answer the question
In order to leave comments, you need to log in
How to remove hangup when saving larger Delphi txt file?
Information from the site is parsed into the memo, sometimes 10-20k lines, and when you click on save, the software freezes, how to avoid it ?!
Answer the question
In order to leave comments, you need to log in
I am a high-level Psychic, my references say that you are parsing the Memo from the main thread, but you need to create a child thread that will parse whatever you want in the Memo.
Link , similarly with writing to a txt file, make a record in a separate stream, at the end let the message "Record completed" pop up, or you can implement a progress bar that shows the current progress of writing to a file. Everything is in your power, young man.
Write in those. Google support to get you unbanned. Application.ProcessMessages
Method
There are many options, and yes, some will do.
1. Simple and dirty. Periodically do Application.ProcessMessages. Make sure that none of the buttons work during operation.
2. Better for the finished product. Set up the flow. Attention, the network in the main thread is, in principle, not a good thing, if it is there - let's go write the second one!
3. Optimize the algorithm.
4. Get rid of left redraws. Google post WM_SETREDRAW. Don't forget at the end of Invalidate.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question