Last modified: 2012-02-24 02:52:05 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T35022, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 33022 - Flash of Unstyled Content when loading bookmarks in Android App
Flash of Unstyled Content when loading bookmarks in Android App
Status: RESOLVED FIXED
Product: Wikipedia App
Classification: Unclassified
Generic (Other open bugs)
1.0.0 (Android)
All All
: Normal normal
: ---
Assigned To: Brion Vibber
:
Depends on:
Blocks: 31447
  Show dependency treegraph
 
Reported: 2011-12-13 10:01 UTC by Yuvi Panda
Modified: 2012-02-24 02:52 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: Android
Assignee Huggle Beta Tester: ---


Attachments

Description Yuvi Panda 2011-12-13 10:01:43 UTC
Loading a bookmark loads the html without js/css, which load quite slowly. Leads to unstyled bad looking plain-text for about 10-15s on my device.
Comment 1 Brion Vibber 2011-12-13 11:16:32 UTC
Yeah, this is a side effect of how the caching currently works; basically there's a low-level caching plugin which fetches the original page content exactly, and then the JS comes and does fixups to the styles and links. Eww?

Saving the fixed content instead would help.
Comment 2 Yuvi Panda 2011-12-13 14:41:57 UTC
Is that even possible? ('saving the fixed content')? Save final serialized DOM
tree structure, perhaps? Can DOM trees even be serialized?
Comment 3 Phil Chang 2011-12-14 00:19:07 UTC
I saw this behavior when hitting the back button, but the page would never load fully and the app crashed (this was reported as bug 32998).
Comment 4 Brion Vibber 2011-12-15 19:07:51 UTC
I worked around this by hiding the iframe during initial stages of load, and showing it again after the styles had been replaced.

commit 6457d1ce676996099cf30544d7db7af33b3a23b8


bug 32998 still remains however.
Comment 5 Yuvi Panda 2011-12-15 20:01:02 UTC
Not sure if this is 'good enough' - the content area blanks out for about 15-20 seconds on my phone when I load a bookmark. Also happens when I simply add a bookmark. Is there a 'proper' fix?
Comment 6 Yuvi Panda 2011-12-15 20:01:12 UTC
Not sure if this is 'good enough' - the content area blanks out for about 15-20 seconds on my phone when I load a bookmark. Also happens when I simply add a bookmark. Is there a 'proper' fix?
Comment 7 Brion Vibber 2011-12-15 20:21:13 UTC
This no longer happens when bookmarking on my cachework branch, as the pages are loaded through urlcache to begin with now. Can you build that locally and test how long it takes to load things for you?

https://github.com/brion/Wikipedia/tree/cachework

This does leave us waiting for the entire HTML to load, but once one set of styles has been cached they should stay pretty well for a while so won't cause additional delays beyond the HTML for second page and beyond.
Comment 8 Yuvi Panda 2011-12-15 21:06:54 UTC
Just tested it, seems to be the same (15s for India article from bookmark for both master and cachework). Seems to vary by article size - Adulasion Horse article takes only 7s (on both) for example.
Comment 9 Brion Vibber 2011-12-15 21:08:07 UTC
Darn... may be that the only good way to handle this is to modify the pages before caching -- that means tweaking the cache... a lot...
Comment 10 Brion Vibber 2011-12-16 18:30:35 UTC
I'm going to go ahead and close this out and break out the slow loading issue to bug 33197 -- I've made that a blocker on 1.1 release and added a note that changing how the caching works so we save the already fixed-up version should resolve the slowness without reintroducing flash-of-unstyled-content.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links