edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
* [Edbrowse-dev] innerHTML length limit
@ 2017-03-17 14:50 Karl Dahlke
  0 siblings, 0 replies; only message in thread
From: Karl Dahlke @ 2017-03-17 14:50 UTC (permalink / raw)
  To: Edbrowse-dev

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

>From the dawn of tidy, I put a length limit on innerHTML text strings. Not sure why.
Guess I was wearing my math hat and not my practical computer hat.
In theory memory could be consumed as the square of the html document.

<div><div><div><div><div> ...
</div></div></div></div></div>

But that is pathological, and probably doesn't happen in the real world.
Meantime, some js wants to see body.innerHTML, the entire document.
So I removed the length restriction. Anything goes.
I then turned to a rather large html document with lots of tags, our users guide.
There was no change that I could detect, but then again, there's no js either.
Some time back I added a feature to suppress all js if there are no scripts, no onclick code, etc.
At db3 you'll see the message
no js dorrway
indicating this.
This was especially important when huge pdf books are turned into html, then into text to read,
and you don't want all that js machinery for no reason.
Anyways, I added <script> to our usersguide and then saw a half second delay in browsing.
This is pretty much worst case, and I suppose a half second won't make or break us.
So there it is.

Other than performance I didn't think this could break anything, so didn't mind sliding it in before our version, which I still hope to set in a few days, unless there is an objection.

Karl Dahlke

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-03-17 14:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-17 14:50 [Edbrowse-dev] innerHTML length limit 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).