white-space:pre-wrap causes browser to display information VERY slowly

537 views
Skip to first unread message

Henri Isenberg

unread,
Apr 13, 2016, 4:35:05 AM4/13/16
to Chromium-discuss
Using the CSS "white-space:pre-wrap" will slow down the Chrome browser to a complete crawl when you have a large amount of text.
The same CSS will execute 30 times faster on IE and FireFox.

Sample HTML:

<pre style="white-space:pre-wrap" class="no-padding">
... a lot of text goes here....
</pre>

When I use "white-space:pre" the browser loads very quickly, but the text doesn't wrap (even is I use the word-break: break-all and word-wrap: break-word styles options).  Instead I would get a very long horizontal scroll-bar.

I found a related post on another website and they actually have reproduced the problem with some sample code:


This problem started in the beginning of March 2016 and appears to have coincided with a Chrome upgrade that occurred at that time.

For now, we are stuck having to use different browsers to get around this problem.

PhistucK

unread,
Apr 13, 2016, 5:10:01 AM4/13/16
to henri.i...@gmail.com, Chromium-discuss
You can search crbug.com for an existing issue and star it. If you cannot find one, file a new issue using the "New issue" link on the same page.
Please, do not add a "+1" or "Me too" or "Confirmed" (or similar) comment. It just wastes the time of Chrome engineers and sends unnecessary e-mails to all of the people who starred the issue.

You can reply with a link to the found or created issue and might get triaged (and fixed) faster.

Thank you.



PhistucK

--
--
Chromium Discussion mailing list: chromium...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-discuss

---
You received this message because you are subscribed to the Google Groups "Chromium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discu...@chromium.org.

Koji Ishii

unread,
Apr 13, 2016, 5:48:00 AM4/13/16
to PhistucK Productions, henri.i...@gmail.com, Chromium-discuss
We're aware of some cases where Chrome is slow. The break-all case should have been fixed in M51 by crrev.com/385693, and also cases where a long text without any space characters is tracked in crbug.com/593679 and is in progress.

If you could file your reproducing URLs to crbug.com as phistuck@ suggested, that'd help us a lot. Thank you for your support in advance.

/koji
Reply all
Reply to author
Forward
0 new messages