Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^5: weird case of memory corruption? -- Tk ProgressBar bugged?

by Marshall (Canon)
on May 12, 2021 at 11:44 UTC ( [id://11132467]=note: print w/replies, xml ) Need Help??


in reply to Re^4: weird case of memory corruption? -- Tk ProgressBar bugged?
in thread weird case of memory corruption?

OK. Your point is accepted and verified by me on Perl v5.24.

I actually saw this in my testing, but I couldn't believe my own eyes!
The exact same source code can produce different results when run more than once.

I am flabbergasted! This is true, but I don't know why or how?

More Info:
Updating a Windows GUI is an extremely expensive operation.
If you have a loop that will do say 10,000 operations, and you want to show progress via a percent or a progress bar, calculate whether or not the progress bar will move before you update the GUI's value - do this at most 100 times (each one percent for a 100% bar) and probably less than that! The difference in performance between calling the GUI 10,000 times vs 100 times is astonishing!

  • Comment on Re^5: weird case of memory corruption? -- Tk ProgressBar bugged?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11132467]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (4)
As of 2024-04-19 19:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found