very slow switching to history plot tab

Issue #202 resolved
dd1 created an issue

To reproduce: (google-chrome on macos)

  • open a history tab
  • go to some other tab, browse the web, whatever, for about 5 minutes
  • go back to the history tab, the tab will be completely empty
  • after about 10-15 second of 100% CPU use, the tab refreshes

K.O.

Comments (6)

  1. dd1 reporter

    I have never before seen browser tabs be completely empty after switching to them. What is special about the history tabs?!? Interesting. K.O.

  2. dd1 reporter

    additional information: if I iconize the window with the history tab, this problem does not happen. it only happens if I switch to a different tab (the history tab becomes inactive). K.O.

  3. Stefan Ritt

    I can’t reproduce this problem. MacBook Pro 16 GB, Chrome 78.0.3904.108. Please note that I added code to not update the history if the tab is hidden:

    https://bitbucket.org/tmidas/midas/commits/e8bede86f177856386b384f525cd56c83e97b41c

    but this code is only loaded when you clear your browser’s cache. JS is unfortunately not reloaded if you simply press the browsers reload button. I actually installed the Crome extension “Clear Cache”, which gives me a simple button to clear the browser’s cache and reload all JS code.

  4. Stefan Ritt

    Finally I could reproduce that error. This does not only happen if the history tab is hidden, but also when the screen gets turned off for some time and you turn it on again. It seems like the timers pile up, and once the browser gets again the CPU, it wants to deliver 100’000 timers each of which draw the history panel once. So the browser draws the history panel in kind of an endless loop which makes it unresponsive. I added now some code which restricts the history panel to only been drawn once per second. So if it gets 100’000 timer events, it only draws the first one and neglects the others (if they are delivered all within one second). So clear your browser caches and try again with the last update.

  5. Log in to comment