[Dillo-dev] long lines and slowness (common when viewing style sheets)

0 views
Skip to first unread message

eocene

unread,
May 26, 2015, 2:57:17 PM5/26/15
to dill...@dillo.org

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.


_______________________________________________
Dillo-dev mailing list
Dill...@dillo.org
http://lists.dillo.org/cgi-bin/mailman/listinfo/dillo-dev

Sebastian Geerken

unread,
May 26, 2015, 3:53:45 PM5/26/15
to dill...@dillo.org
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

signature.asc
Reply all
Reply to author
Forward
0 new messages