Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

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

by RichardK (Parson)
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

Replies are listed 'Best First'.
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?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1058293]
[Corion]: 1nickt: In a sense the meta-bullshit might even be beneficial to you as you get to hear the cow-orkers talk (or not talk) about the issues you perceive. I think Agile is mostly about the meta ;)
[Corion]: 1nickt: On Sunday maybe 10cm of snow fell, and the airport closed, and the trains stopped running etc :) It always comes as a surprise that snow falls here during the winter...
[marto]: 1nickt, no snow, just some ice on the roads and the usual idiocy associated with humans and driving in less than ideal conditions
[1nickt]: Corion I am trying to keep an open mind :-) Or at least, go with the flow. marto yes I saw som photos of lorries overturned on country roads, and wondered why they would have been driving fast enough to have that happen!

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (7)
As of 2017-12-11 11:52 GMT
Find Nodes?
    Voting Booth?
    What programming language do you hate the most?

    Results (289 votes). Check out past polls.