Hi André,
Thanks for your replay,its very helpful for me.
I have another one problem is
Eg:
var dp = new LzDatapointer();
var res=dp.xpathQuery("example:/recordUpdate/record");
var elem = new LzDataElement("update",{NAME_TO:'wilbert'});
var newNodeRef = dp.parentNode.insertBefore(elem, dp.p);
dp.destroy();
In this example every time the new node element is created,in which the object
is not clearing from memory, so adding new node time is increased again and
again.
I will tried using cloneNode() and setChildNodes([]) also, I could not getting
the solution, the memory size(CPU utilities) is increased again and again.
Eg:
var newNodeRef = dp.parentNode.insertBefore(elem.cloneNode(true), dp.p);
or
res. setChildNodes([])
Please can you give me any solution for this issue?
Regards,
Wilbert
-----Original Message-----
From: André Bargull [mailto:[email protected]]
Sent: Wednesday, February 02, 2011 4:52 PM
To: Singh, Wilbert
Cc: laszlo-user
Subject: Re: [Laszlo-user] how to clear memory-dataset
I'm not sure the performance degradation is caused by the iteration over
the data-nodes. Using the attached test case with OpenLaszlo 4.9, no
degradation was noticeable (swf8: ~150ms, swf10: ~50ms, dhtml: ~40ms per
each method invocation). For slightly better performance, you can change
the iteration as follows:
var res = dp.xpathQuery("ds:/root/a");
for (var i = 0, len = res.length; i < len; ++i) {
res[i].setAttr("name", "wilbert");
}
(swf8: ~80ms, swf10: ~30ms, dhtml: ~30ms)
- André
> Hi All,
>
> If any one knows how to clear flash memory through java script.
> Please see the below example.
>
>
> Ex:
>
> var dp = new LzDatapointer();
> var res=dp.xpathQuery("example:/recordUpdate/record");
> int i=0;
> while(i<res.length) {
> dp.setPointer( res[i]);
> res.setNodeAttribute("name","wilbert");
> i++;
> }
> dp.destroy();
>
>
>
>
>
>
> Here first time its taking 5 Sec,again I calling the same function then the
> time will be increased again again, after 5th calling its take 30 Sec.how to
> clear the memory here. I tried using dupPointer(),but no performance
> improvement is there.
>
>
> Please any one tell me how to clear the memory every time.
>
>
>
>
> Regards,
> Wilbert
>
> Information contained and transmitted by this e-mail is confidential and
> proprietary to Patni Computer Systems Ltd and its affiliates (hitherto
> referred as Patni Computers) and is intended for use only by the recipient.
> If you are not the intended recipient , you are hereby notified that any
> dissemination, distribution, copying or use of this e-mail is strictly
> prohibited and you are requested to delete this e-mail immediately and notify
> the originator [email protected]. Patni Computers does not enter into any
> agreement with any party by e-mail. Any views expressed by an individual do
> not necessarily reflect the view of Patni Computers. Patni Computers is not
> responsible for the consequences of any actions taken on the basis of
> information provided, through this email. The contents of an attachment to
> this e-mail may contain software viruses, which could damage your own
> computer system. While Patni Computers has taken every reasonable precaution
> to minimise this risk, !
w!
> e cannot accept liability for any damage which you sustain as a result of
> software viruses. You should carry out your own virus checks before opening
> an attachment. To know more about Patni Computers please visitwww.patni.com.
>
>
Information contained and transmitted by this e-mail is confidential and
proprietary to Patni Computer Systems Ltd and its affiliates (hitherto referred
as Patni Computers) and is intended for use only by the recipient. If you are
not the intended recipient , you are hereby notified that any dissemination,
distribution, copying or use of this e-mail is strictly prohibited and you are
requested to delete this e-mail immediately and notify the originator or
[email protected]. Patni Computers does not enter into any agreement with any
party by e-mail. Any views expressed by an individual do not necessarily
reflect the view of Patni Computers. Patni Computers is not responsible for the
consequences of any actions taken on the basis of information provided, through
this email. The contents of an attachment to this e-mail may contain software
viruses, which could damage your own computer system. While Patni Computers has
taken every reasonable precaution to minimise this risk, w!
e cannot accept liability for any damage which you sustain as a result of
software viruses. You should carry out your own virus checks before opening an
attachment. To know more about Patni Computers please visit www.patni.com.