Quantcast
Channel: Xojo Programming Forum - Latest topics
Viewing all articles
Browse latest Browse all 3791

Window.show memory usage

$
0
0

Not a problem as such but need some clarification.
I have a Desktop program with a function to loop through every record in a database (150,000 or more) and perform a complex calculation based on fields and dates and save the result into a record field.
The problem was that although all variables used were local and private the memory use as viewed in Mac Activity Monitor gradually increases and around the 40,000 record mark the system runs out of system memory (50gb used) and stops with an error message.
I couldn’t put my finger on it and moved all processes out of threads thinking it was creating too many at once but Activity Monitor was showing the queue function was sticking to 10 at a time as it should.
Turned out to be the progress window which informs the user of the progress percentage which is activated by a timer. Not that it was using any resources but the timer was calling the window.show event every time it needs to change the percentage.
I didn’t realise that if you call it again while it is already displayed it uses about 10mb of memory each time. I thought the instruction would be ignored if it was already visible as I just want to bring the present window to the front.
Has anyone else had this happen?

3 posts - 3 participants

Read full topic


Viewing all articles
Browse latest Browse all 3791

Trending Articles