Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re^5: Perl tk gui hangs when large data thrown to it

by RichardK (Priest)
on Oct 15, 2013 at 13:11 UTC ( #1058293=note: print w/ replies, xml ) Need Help??


in reply to Re^4: Perl tk gui hangs when large data thrown to it
in thread Perl tk gui hangs when large data thrown to it

I think you're just expecting too much. You cannot see an event that only lasts 1 millisecond so there's no point updating you display that quickly. If you data really is changing that quickly just cache it until the next screen update.

I've changed the repeat to 20ms, removed the prints from changeitem and increased then rand row to 100, and your code works. But even 50 updates per second are too many, I'd try 10 or less, as you don't really need video rates.


Comment on Re^5: Perl tk gui hangs when large data thrown to it
Re^6: Perl tk gui hangs when large data thrown to it
by Anonymous Monk on Oct 15, 2013 at 16:54 UTC

    Ok, I understand.
    But I even tried the same thing with thread, where the inter-process communication is happening in one thread and the gui is in another thread. I hoped threading would be able to handle the scenario but it could not. As I have explained earlier in this post, the client is sending data with usleep(some number) interval of time, the server reads the data and writes that into a shared variable. The gui thread reads from that shared variable and invokes the relevant gui updateDisplay() routine to update the gui.
    But this also not bringing things up if the usleep is very small amount of time and I am trying to change some 1k rows every millisecond. But how can not threading the handle this problem ? Why this gui is not responding ?

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (10)
As of 2014-12-26 07:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (168 votes), past polls