long lines and slowness (common when viewing style sheets)

Now that everyone likes to send their style sheets as one big long line, like 250k long, viewing them in dillo is slow. gprof says % cumulative self self total time seconds seconds calls s/call s/call name 32.47 1.88 1.88 189407242 0.00 0.00 lout::misc::NotSoSimpleVector<dw::Textblock::Word>::getRef(int) const 29.36 3.58 1.70 187437456 0.00 0.00 dw::Textblock::BadnessAndPenalty::lineCanBeBroken(int) 28.15 5.21 1.63 29345 0.00 0.00 dw::Textblock::wrapWordInFlow(int, bool) and I wonder whether any optimizations are possible.

On Di, Mai 26, 2015, eocene wrote:
Now that everyone likes to send their style sheets as one big long line, like 250k long, viewing them in dillo is slow.
gprof says % cumulative self self total time seconds seconds calls s/call s/call name 32.47 1.88 1.88 189407242 0.00 0.00 lout::misc::NotSoSimpleVector<dw::Textblock::Word>::getRef(int) const 29.36 3.58 1.70 187437456 0.00 0.00 dw::Textblock::BadnessAndPenalty::lineCanBeBroken(int) 28.15 5.21 1.63 29345 0.00 0.00 dw::Textblock::wrapWordInFlow(int, bool)
and I wonder whether any optimizations are possible.
Yes, I know this bug (you sent it me some time ago), and it is on my todo list. Since this occured first with hyphenation (or rather per-line optimization), there is certainly a way to optimize it. A vague guess is that it has to do with the iteration over the line to find the best break point. (BTW: the functionality used for plain text could also be provided by a new widget which is much simpler than Textblock.) Sebastian
participants (2)
-
eocene@gmx.com
-
sgeerken@dillo.org