Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance issue on Safari/iOS iPad 3 #41

Closed
JpEncausse opened this issue Mar 28, 2012 · 3 comments
Closed

Performance issue on Safari/iOS iPad 3 #41

JpEncausse opened this issue Mar 28, 2012 · 3 comments

Comments

@JpEncausse
Copy link

It seems the initialisation of the store is really slow on Safari/iOS

How to reproduce:

  • I create a basic page cached with appcache
  • onLoad I call store.get() and update a using innerHTML.

=> On Chrome, the page is "instant" I only see a little flicks
=> On iPad3 / Safari, I have to wait 4 seconds until the page is updated
=> Next get/set are fast

According to this article (http://hacks.mozilla.org/2012/03/there-is-no-simple-solution-for-local-storage/) local storage is slow but I didn't think so much ??

  • Is there best practices ?
  • Is there a tips on iOS ?
  • May be the first access of appcache slow down the process ?
@marcuswestin
Copy link
Owner

Hi @JpEncausse - was this not an issue with store.js? Either way I'd be curious to hear what was going on :)

Cheers!
Marcus

@JpEncausse
Copy link
Author

Well it is really weird, on iOS (Safari/iPad3) if I run a JS code that update the DOM (not an alert) after DOM Load (on defer()) it seems the app waits few seconds to do the job.

I think the defer() => PrototypeJS on DOM Load is delayed by MobileSafari may be to handle the appcache job. And it's really faster on Chrome.

The workaround is to the job straight forward (no defer). There is no issue with store.js

@marcuswestin
Copy link
Owner

Very interesting! Thanks for sharing man.

Cheers!
Marcus

On Thu, Apr 12, 2012 at 2:30 PM, Jean-Philippe Encausse <
reply@reply.github.com

wrote:

Well it is really weird, on iOS (Safari/iPad3) if I run a JS code that
update the DOM (not an alert) after DOM Load (on defer()) it seems the app
waits few seconds to do the job.

I think the defer() => PrototypeJS on DOM Load is delayed by MobileSafari
may be to handle the appcache job. And it's really faster on Chrome.

The workaround is to the job straight forward (no defer). There is no
issue with store.js


Reply to this email directly or view it on GitHub:
#41 (comment)

My code http://github.com/marcuswestin
My latest http://twitter.com/marcuswestin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants