A few questions

Nicolas Deschildre nicolasdchd at ifrance.com
Thu May 8 18:28:23 BST 2003


Hi!
First of all, sorry if you received this mail twice, it seems that i
have some pbs with sending mails...

> On 3 May 2003, Nicolas Deschildre wrote:
> 
> > Hi,
> > Still about kafka, i'd like to ask you some little things, mainly
about
> > khtml's internal:
> > To build the DOM::Node tree, i use the Quanta tree, and for each
Quanta
> > Node, i create a DOM::Node and inserts it. This method is very slow
(it
> > takes 750 ms to load an 50 lines HTML file whereas khtml rendering
is
> > instantaneous) : i believe each time a DOM::Node is inserted, the
> > rendering is updated and that is what make it very slow. Am i right?
> > One solution could be do add all the child nodes to the root node
first
> > and then insert it in the tree (not yet tested)? Else, does one
method
> > exist to turn off/on rendering?
> 
> Whenever you add a node into the tree it calls setChanged() which
marks it 
> for updating the next time the DocumentImpl::updateRendering() is
called 
> rather than doing it automatically. Which reminds me, we still need a 
> public method for this...

So adding the root Node with all the Nodes added to it to the Document
object at the end make khtml render only one time (and thus make it load
much faster)?
BTW, what DOM::Node::applyChanges() does?

Another problem, the much important of all: 
DOM::Node::setNodeValue() speed : everytime you type a char, this
function is called : the problem is that it is quite long and typing
text very fast (keep a key pressed) make the text to take up to 20
second to appears (all the text appears in 1 time; on my celeron 633, it
use 100 % CPU) This could be improved by delayed synchronization on
quanta side, but if i take the old kafka without any synchronization it
is still a bit slow (one or two second for typing very fast).
This is not a real problem as kafka could work with that, but i wanted
to be sure that there is no faster solution that setNodeValue(), and if
this method could be improved (i don't know khtml internal, i'm
supposing that the best has already be done, but i just wanted to be
sure...)

> 
> > 
> > Have yo an idea why i couldn't insert "special" character like é,
è,
> > ù,... with the method DOM::Node::setNodeValue(QString); ??
> 
> What happens when you try to do this... does it replace the character
with 
> something else or not include it at all?
> What type of node are you using this on (e.g. Attr or Text)?

I'm trying to edit Text nodes, and nothing appears... BTW, have you a
solution for the Attr too?

> 
> > 
> > How do i turn off buttons and links?? In fact, it is already turn
off (i
> > don't know how), but i get the message "Warning: Your data is about
to
> > be transmitted across the network unencrypted ...". It's not
important,
> > but if an method already exist to turn this off...
> 

> This may be beacuse you are overriding the mouse event methods in 
> KHTMLPart. I'm not sure of a way to disable these other than filtering
the 
> events yourself. When do you get the message? You would have to
presumably 
> submit the form somehow for this to happen.

I get this message only when clicking on a submit button. I'll try to
filter it out.

> > 
> > Thanks very much for the answers
> > ++
> > Nicolas

_____________________________________________________________________
Envie de discuter en "live" avec vos amis ? Télécharger MSN Messenger
http://www.ifrance.com/_reloc/m la 1ère messagerie instantanée de France





More information about the kfm-devel mailing list