Question

I'm trying to figure out how the sublime text community package list works over at http://wbond.net/sublime_packages/community

The page itself displays after about a second and seems fine to use. You can inspect element too, and that also works fine, the dev tools window opens up straight away.

But if you click "view source", it takes absolutely ages for the source code to display. I've tried this on lots of different browsers. Why is this?

Was it helpful?

Solution

The slowness is caused by the syntax highlighter. Chrome's view-source: attempts to highlight the whole file at once, which takes some time on a 1.5MB file.

Press Shift + Esc to show Chrome's Task Manager, and you will see that the CPU shoots up on "view source". If you wait a little longer, the "Page(s) Unresponsive" dialog will show up (as shown below).

This bug has been reported before at https://code.google.com/p/chromium/issues/detail?id=128293

OTHER TIPS

The page is extremely large. It has a total size of 1,5MB so the source viewers have some troubles loading that. There are about 35000 lines of source code in there, a pretty hefty HTML file I would say :)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top