You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 22, 2020. It is now read-only.
I noticed that on extremely large files - say, 3000 lines of code inside a
single <code> tag - IE 6 and 7 spend the vast majority of rendering time
replacing <br>s with \r\n after the rest of the markup has occurred. By
choosing the appropriate newline style inside recombineTagsAndDecoration, we
can eliminate the replacement step at the end.
I've attached a patch that implements this. On the aforementioned 3kloc test
file, it reduces IE7 rendering time on my computer from 40s to 10s, with
similar results for IE6.
Original issue reported on code.google.com by jacobly@google.com on 10 Dec 2009 at 7:52
Thanks so much for profiling. It's really hard for me to run one since I can
only run
IE under VMWare which is a royal PITA.
I'll try incorporating this when I get a chance. Do you know where time under
IE8 is
spent?
Original comment by mikesamuel@gmail.com on 10 Dec 2009 at 8:31
I just found out that IE 8 has an actual profiler, a pretty good one. I
actually didn't
realize earlier that this issue affected IE 8 as well, but it does.
With the patch to prettify.js, the time spent is actually fairly
well-distributed (without
it, there's an extra 24 seconds inside replaceWithPrettyPrintedHtml). Out of a
total of
1400ms, the largest contributor was emitTextUpTo at 750ms (including its
callees in
the time spent). This function was called 25000 times, so that's not too bad. I
was
actually very impressed with how fast IE 8 is on this page. In all of these
cases, the
total time spent in a function exceeded the time spent in its callees and in
its own
body, meaning that a large body of time is spent in IE itself, doing rendering.
I've attached a csv file exported from the profiler.
Original comment by jacobly@google.com on 10 Dec 2009 at 9:27
Original issue reported on code.google.com by
jacobly@google.com
on 10 Dec 2009 at 7:52Attachments:
The text was updated successfully, but these errors were encountered: