edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
* [Edbrowse-dev] edbrowse-js back in the fold??
@ 2015-09-26 14:05 Karl Dahlke
  2015-09-28  4:42 ` Adam Thompson
  0 siblings, 1 reply; 6+ messages in thread
From: Karl Dahlke @ 2015-09-26 14:05 UTC (permalink / raw)
  To: Edbrowse-dev; +Cc: ubuntu

As per a discussion that has been taking place off line,
and really needs to move to this group,
js has to immediately, and within its innerHTML setter,
parse the new html text and add the new objects to the js tree,
while at the same time, or not long there after,
adding the tree of nodes to our tree for rendering.
Both processes now need tidy5, html-tidy.c,
and at least half of the logic in render.c.
With this new revelation,
how much easier would all this be if we hadn't separated edbrowse-js into another process!
As Fagin says in Oliver,
I think I better think it out again.

Don't get me wrong - encapsulating js into a separate entity of some kind,
with its own source file, and the mozilla details hidden in that source file,
and a communication api to and from the js layer,
was absolutely the right thing to do. Absolutely!
Thank you Adam for directing us down this path.
But we did the same for tidy without making another process.
Now if they were once again the same process,
possibly different threads of the same process,

1. One less hassle with the windows port, as threads are standard
and portable, and the spinning off of the process with pipes not so much.

2. js innerHTML and document.write can build js objects and add to our tree of nodes
immediately, in the setter, as is suppose to happen, and all in one go,
all at the same time.

3. No need to pass the html, or the resulting subtree,
back through the pipes and back to edbrowse for incorporation.

4. Better performance (a minor consideration).

5. All of edbrowse is once again a c++ program (a minor nuisance).

6. seg fault on the js side would once again bring down all of edbrowse.
This was one of our considerations,
but I would hope those seg faults are becoming infrequent, and I think they are.

If we really must keep them separate processes, could we use shared memory
so both can work on the one common tree of nodes?
Is shmget portable to windows?
Doesn't shmget require a fixed block of memory of a fixed size?
That's the way I remember it.
that's how the man page reads.
That wouldn't work well with our model;
I want to be able to dynamically grow the tree as big as the web page is,
without compile time constraints or even run time committment to a size,
as we have to do for instance with mozilla's js pool.
I mean we could set a pool size at run time for the trees of html nodes managed by edbrowse,
wouldn't be a show stopper, just not my first preference.

After the last flurry of work settles down and stabilizes,
and this has been all good stuff,
all moving us forward in the right direction,
but after that settles we need to discuss
and plan and design before making the next big change.
We either need to move some html / render functionality into both processes,
with subtree data coming back through pipes,
or combine things back into one edbrowse process,
or find a shared memory solution.


Karl Dahlke

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

end of thread, other threads:[~2015-09-29  8:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-26 14:05 [Edbrowse-dev] edbrowse-js back in the fold?? Karl Dahlke
2015-09-28  4:42 ` Adam Thompson
2015-09-28 15:20   ` Chris Brannon
2015-09-28 17:28     ` Karl Dahlke
2015-09-29  7:25     ` Adam Thompson
2015-09-29  8:16       ` 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).