Evgenus / spa

Single Page Applications builder
Other
7 stars 2 forks source link

spa does not load in background tab #51

Closed wizzard0 closed 10 years ago

wizzard0 commented 10 years ago

How to reproduce:

  1. Use chrome, open a tab with link to spa app.
  2. Middle-click a link to SPA application, wait 30+ seconds, observe the tab title does not change
  3. Activate a tab
  4. See that spa started booting just AFTER the tab has been activated.
Evgenus commented 10 years ago

Need to read and understand this article http://peter.michaux.ca/articles/the-window-onload-problem-still

wizzard0 commented 10 years ago

Nope, the article describes another (bug?).

Not only spa requires tab to be active to begin loading, tab also needs to stay foreground during entire loading process.

wizzard0 commented 10 years ago

note, repro requires Chrome

Evgenus commented 10 years ago

I've found this to be a performance issue in chrome. http://stackoverflow.com/questions/6585112/javascript-performance-when-running-in-an-unfocused-tab . SPA uses localforage which uses setTimeout a lot. So far is see no viable solution

Evgenus commented 10 years ago

Actually it does, but very-very slow. Like 10 times slower. Closing it for now because problem is either in browser or in localforage.