edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
* [Edbrowse-dev] stackoverflow and css
@ 2018-02-11 18:53 Karl Dahlke
  2018-02-11 19:25 ` Adam Thompson
  0 siblings, 1 reply; 7+ messages in thread
From: Karl Dahlke @ 2018-02-11 18:53 UTC (permalink / raw)
  To: Edbrowse-dev

[-- Attachment #1: Type: text/plain, Size: 951 bytes --]

The css portion, that maps css attributes over to objects, takes 2 minutes to run.
That's not the infinite loop, but it is intolerable nonetheless.
Browse www.stackoverflow.com with db3 and watch 2 minutes go by between

execute eb$qs$start
execution complete

The version we got was built to run and handle all situations, and be robust, but obviously not optimized.
Optimizing things is something I'm good at, but it's a lot of code doing something I'm not entirely familiar with, so I would be taking a big bite.
Could it be optimized and still be javascript? Is it primarily an algorithmic inefficiency?
Or would it have to be rewritten in C?
I hope the former, because turning all that into C would be a pain!
There's no real reason to mess with the css parser, that runs once and pretty fast,
but querySelectorAll compares every css directive against every node in the document, which is potentially an n^2 problem.

Karl Dahlke

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-02-13 19:05 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-11 18:53 [Edbrowse-dev] stackoverflow and css Karl Dahlke
2018-02-11 19:25 ` Adam Thompson
2018-02-11 19:43   ` Adam Thompson
2018-02-11 21:03     ` Karl Dahlke
2018-02-11 21:24     ` Karl Dahlke
2018-02-13 19:05       ` Adam Thompson
2018-02-11 23:08     ` Karl Dahlke

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).