Dietrich Streifert schrieb:
>
>
> Sebastian Werner schrieb:
>> So the performance impact comes from the for-loop. I think there is no
>> chance to make this greatly better. It's just a loop. Maybe the delete
>> operator is that bad.
>>
> So just nullifying the attributes is not enough, right?
>
> this[qx.OO.values[a[i]]] = null;
It's the same. And should have the identical performance.
Sebastian
>
>
>> Sebastian
>>
>>
>> Dietrich Streifert schrieb:
>>
>>> Sorry! I mean the split does NOT do the performance impact!
>>>
>>> It's getting late. I should stop working for today.
>>>
>>> Dietrich Streifert schrieb:
>>>
>>>> Its fast! So the split does the performance impact!
>>>>
>>>>
>>>> Sebastian Werner schrieb:
>>>>
>>>>> Dietrich Streifert schrieb:
>>>>>
>>>>>
>>>>>> Yes understood.
>>>>>>
>>>>>> The following code seems to be a point where it looks like to be worth
>>>>>> to investigate for optimizations in the instance method dispose of
>>>>>> qx.core.Object:
>>>>>>
>>>>>>
>>>>>> // Finally cleanup properties
>>>>>> if (this._objectproperties)
>>>>>> {
>>>>>> var a = this._objectproperties.split(qx.constant.Core.COMMA);
>>>>>> var l = a.length;
>>>>>> for (var i=0; i<l; i++) {
>>>>>> delete this[qx.OO.values[a[i]]];
>>>>>> }
>>>>>> delete this._objectproperties;
>>>>>> }
>>>>>>
>>>>>> So my understanding is that in _objectproperties a comma separated list
>>>>>> exist of the property names. i.e.:
>>>>>>
>>>>>> "value, name"
>>>>>>
>>>>>> qx.OO.values holds a "translation" array which converts from the
>>>>>> property name to the attribute name. In this case calling
>>>>>>
>>>>>> qx.OO.values["value"] results in "_valueValue".
>>>>>>
>>>>>> and implies the existence of the property
>>>>>>
>>>>>> this._valueValue
>>>>>>
>>>>>> So the loop traverses the _objectproperties and deletes them.
>>>>>>
>>>>>> I disabled the code above and the disposition is fast! So it seems that
>>>>>> the disposer method spends a lot of time in this loop.
>>>>>>
>>>>>>
>>>>> Just natural as qooxdoo holds quite much data in objects. Maybe we could
>>>>> cache the split return. Could you test it and leave only this in your
>>>>> code:
>>>>>
>>>>> > // Finally cleanup properties
>>>>> > if (this._objectproperties)
>>>>> > {
>>>>> > var a = this._objectproperties.split(qx.constant.Core.COMMA);
>>>>> > var l = a.length;
>>>>> > //for (var i=0; i<l; i++) {
>>>>> > // delete this[qx.OO.values[a[i]]];
>>>>> > //}
>>>>> > //delete this._objectproperties;
>>>>> > }
>>>>>
>>>>>
>>>> Its fast! So the split does the performance impact!
>>>>
>>>>
>>>>> Is this also that slow?
>>>>>
>>>>> Sebastian
>>>>>
>>>>>
>>>>>
>>>>>> Sebastian Werner schrieb:
>>>>>>
>>>>>>
>>>>>>> Dietrich Streifert schrieb:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>> Is the "full" disposing needed for a page unload?
>>>>>>>>
>>>>>>>> Would it be enough to have a light version of the dispose code for the
>>>>>>>> page unload case?
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>> I am sorry. But this is not possible. You must dispose this otherwise
>>>>>>> you will have memory leaks. The only possibility is to make the
>>>>>>> disposer
>>>>>>> itself faster.
>>>>>>>
>>>>>>> Sebastian
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>> Sebastian Werner schrieb:
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>> Dietrich Streifert schrieb:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>> Thank you Sebastian!
>>>>>>>>>>
>>>>>>>>>> Now I think I got the path:
>>>>>>>>>>
>>>>>>>>>> qx.core.Object has a class method called dispose and an instance
>>>>>>>>>> method
>>>>>>>>>> called dispose.
>>>>>>>>>>
>>>>>>>>>> Every instance of qx.core.Object is stored in the class attribute
>>>>>>>>>> qx.Class._db at instantiation time (by the constructor):
>>>>>>>>>>
>>>>>>>>>> qx.core.Object._db.push(this);
>>>>>>>>>>
>>>>>>>>>> The onunload event of the document fires the disposition of all
>>>>>>>>>> qx.core.Objects in the _db array by calling qx.Class.dispose. The
>>>>>>>>>> codepart with does the dispose is:
>>>>>>>>>>
>>>>>>>>>> for (var i=qx.core.Object._db.length-1; i>=0; i--)
>>>>>>>>>> {
>>>>>>>>>> vObject = qx.core.Object._db[i];
>>>>>>>>>>
>>>>>>>>>> if (vObject != null)
>>>>>>>>>> {
>>>>>>>>>> // logger.debug("Disposing: " + vObject);
>>>>>>>>>> vObject.dispose();
>>>>>>>>>> qx.core.Object._db[i] = null;
>>>>>>>>>> }
>>>>>>>>>> }
>>>>>>>>>>
>>>>>>>>>> so the the dispose method of each instance of qx.core.Object (and
>>>>>>>>>> its
>>>>>>>>>> subclasses) gets called.
>>>>>>>>>>
>>>>>>>>>> In the instance dispose method the object properties and the object
>>>>>>>>>> userdata instances get deleted.
>>>>>>>>>> At the bottom of the dispose method there is a code part which I
>>>>>>>>>> don't
>>>>>>>>>> understand:
>>>>>>>>>>
>>>>>>>>>> // Delete Entry from Object DB
>>>>>>>>>> qx.core.Object._db[this._hashCode] = null;
>>>>>>>>>> delete qx.core.Object._db[this._hashCode];
>>>>>>>>>>
>>>>>>>>>> So first the object reference is nulled and then it is deleted?
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>> Yes, and mhh, this is not needed. The first (nullify) should be
>>>>>>>>> enough.
>>>>>>>>>
>>>>>>>>> Sebastian
>>>>>>>>>
>>>>>>>>> -- snip --
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> -------------------------------------------------------------------------
>>>>>>>>> Take Surveys. Earn Cash. Influence the Future of IT
>>>>>>>>> Join SourceForge.net's Techsay panel and you'll get the chance to
>>>>>>>>> share your
>>>>>>>>> opinions on IT & business topics through brief surveys -- and earn
>>>>>>>>> cash
>>>>>>>>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>>>>>>>>> _______________________________________________
>>>>>>>>> qooxdoo-devel mailing list
>>>>>>>>> [email protected]
>>>>>>>>> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>> --
>>>>>>>> Mit freundlichen Grüßen
>>>>>>>> Dietrich Streifert
>>>>>>>> Visionet GmbH
>>>>>>>>
>>>>>>>>
>>>>>>>> ------------------------------------------------------------------------
>>>>>>>>
>>>>>>>> -------------------------------------------------------------------------
>>>>>>>> Take Surveys. Earn Cash. Influence the Future of IT
>>>>>>>> Join SourceForge.net's Techsay panel and you'll get the chance to
>>>>>>>> share your
>>>>>>>> opinions on IT & business topics through brief surveys -- and earn cash
>>>>>>>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>>>>>>>>
>>>>>>>>
>>>>>>>> ------------------------------------------------------------------------
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> qooxdoo-devel mailing list
>>>>>>>> [email protected]
>>>>>>>> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>> -------------------------------------------------------------------------
>>>>>>> Take Surveys. Earn Cash. Influence the Future of IT
>>>>>>> Join SourceForge.net's Techsay panel and you'll get the chance to share
>>>>>>> your
>>>>>>> opinions on IT & business topics through brief surveys -- and earn cash
>>>>>>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>>>>>>> _______________________________________________
>>>>>>> qooxdoo-devel mailing list
>>>>>>> [email protected]
>>>>>>> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>> --
>>>>>> Mit freundlichen Grüßen
>>>>>> Dietrich Streifert
>>>>>> Visionet GmbH
>>>>>>
>>>>>>
>>>>>> ------------------------------------------------------------------------
>>>>>>
>>>>>> -------------------------------------------------------------------------
>>>>>> Take Surveys. Earn Cash. Influence the Future of IT
>>>>>> Join SourceForge.net's Techsay panel and you'll get the chance to share
>>>>>> your
>>>>>> opinions on IT & business topics through brief surveys -- and earn cash
>>>>>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>>>>>>
>>>>>>
>>>>>> ------------------------------------------------------------------------
>>>>>>
>>>>>> _______________________________________________
>>>>>> qooxdoo-devel mailing list
>>>>>> [email protected]
>>>>>> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>>>>>>
>>>>>>
>>>>> -------------------------------------------------------------------------
>>>>> Take Surveys. Earn Cash. Influence the Future of IT
>>>>> Join SourceForge.net's Techsay panel and you'll get the chance to share
>>>>> your
>>>>> opinions on IT & business topics through brief surveys -- and earn cash
>>>>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>>>>> _______________________________________________
>>>>> qooxdoo-devel mailing list
>>>>> [email protected]
>>>>> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>>>>>
>>>>>
>>>> --
>>>> Mit freundlichen Grüßen
>>>> Dietrich Streifert
>>>> Visionet GmbH
>>>>
>>>> ------------------------------------------------------------------------
>>>>
>>>> -------------------------------------------------------------------------
>>>> Take Surveys. Earn Cash. Influence the Future of IT
>>>> Join SourceForge.net's Techsay panel and you'll get the chance to share
>>>> your
>>>> opinions on IT & business topics through brief surveys -- and earn cash
>>>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>>>> ------------------------------------------------------------------------
>>>>
>>>> _______________________________________________
>>>> qooxdoo-devel mailing list
>>>> [email protected]
>>>> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>>>>
>>>>
>>> --
>>> Mit freundlichen Grüßen
>>> Dietrich Streifert
>>> Visionet GmbH
>>>
>>>
>>> ------------------------------------------------------------------------
>>>
>>> -------------------------------------------------------------------------
>>> Take Surveys. Earn Cash. Influence the Future of IT
>>> Join SourceForge.net's Techsay panel and you'll get the chance to share your
>>> opinions on IT & business topics through brief surveys -- and earn cash
>>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>>>
>>>
>>> ------------------------------------------------------------------------
>>>
>>> _______________________________________________
>>> qooxdoo-devel mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>>>
>>
>>
>> -------------------------------------------------------------------------
>> Take Surveys. Earn Cash. Influence the Future of IT
>> Join SourceForge.net's Techsay panel and you'll get the chance to share your
>> opinions on IT & business topics through brief surveys -- and earn cash
>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>> _______________________________________________
>> qooxdoo-devel mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>>
>
> --
> Mit freundlichen Grüßen
> Dietrich Streifert
> Visionet GmbH
>
>
> ------------------------------------------------------------------------
>
> This body part will be downloaded on demand.
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel