edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
* [edbrowse-dev] tagIsRooted
@ 2020-10-26 18:50 Karl Dahlke
  0 siblings, 0 replies; only message in thread
From: Karl Dahlke @ 2020-10-26 18:50 UTC (permalink / raw)
  To: edbrowse-dev

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

First off, the question I like to ask, and the question you should ask:
why don't other browsers run into trouble if the engine doesn't provide gc free object hooks for the browser to use?
Why does only edbrowse need this stuff?

Because every other browser rerenders the screen after each dom change.
That might be ten times a second, and why not?
If things change that fast it looks like animation, perhaps it is intentional animation.
Or, maybe the little stock price in the upper right corner is constantly changing,
or a countdown timer to when the bidding is ticking down, or whatever.
The user can look at it or not.
His eyes do the selecting.
This on the fly rerendering is a feature for them.
We don't have that luxury.
I can't print "line 3 has changed" ten times per second.
That is an unworkable interface, and it illustrates the nearly impossible task of squashing visual websites into a command line format.
So, I rerender every 20 seconds or so, or if you issue a command that might cause a screen change.
That is my algorithm in a nutshell.
But that means the stuff you are reading, and maybe clicking on, might not be up to date.
The object you are accessing when you submit a form might not even be there any more, freed,
and if I access it, core dump.
So wee need mechanisms that no other browser needs.
duktape happens to provide those mechanisms; I don't think the other engines do.

With this in mind, please pull and look at a routine I wrote,
tagIsRooted() in ebjs.c.
I might call this when you want to go to a hyperlink or submit a form or such,
just to make sure the tag and its corresponding object are still valid.
If I call this in just the right way, from all the right places, I might not need the gc free-object notifications that I get from duktape.

The tagIsRooted routine is kind of awkward, some would say ugly,
but it isn't called often, so it just needs to work, and work reliably.

Reply with comments and thoughts.
This stuff is complicated, probably at the limits of what I can do.
So I'll need help from younger and smarter people.

Karl Dahlke

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

only message in thread, other threads:[~2020-10-26 18:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-26 18:50 [edbrowse-dev] tagIsRooted Karl Dahlke

edbrowse-dev - development list for edbrowse

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.vuxu.org/edbrowse-dev

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 edbrowse-dev edbrowse-dev/ http://inbox.vuxu.org/edbrowse-dev \
		edbrowse-dev@edbrowse.org
	public-inbox-index edbrowse-dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.edbrowse.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git