I've just described two critical features of V3 at our docs site:
DOM Abstraction: http://docs.fckeditor.net/FCKeditor_3.x ... bstraction
Memory Leak Free: http://docs.fckeditor.net/FCKeditor_3.x ... emory_Leak
As said, this is critical, so impressions and suggestions are definitely welcome.
Thanks!
Wed, 02/20/2008 - 13:52
#1
Re: DOM Abstraction and Memory Leak Free
Keith
Re: DOM Abstraction and Memory Leak Free
Frederico Knabben
CKEditor Project Lead and CKSource Owner
--
Follow us on: Twitter | Facebook | Google+ | LinkedIn
Re: DOM Abstraction and Memory Leak Free
Since we'll be abstracting away direct DOM manipulation function calls, Google's leak avoidance approach in GWT may be applicable to us.
DOM Events, Memory Leaks, and You
For the impatient, look at the final section of the article, "GWT's Solution"
Re: DOM Abstraction and Memory Leak Free
Yes, I have an idea which is similar to the GWT proposal. We would be using the same approach as defined in Expandos Handling at our docs. The biggest difference is that we aim to solve a problem, which is the weak point in GWT. The need of clearing their "__listener" expando.
In GWT, a reference to a JS object is saved in their "__listener" expando. This reference must be then removed to avoid memory leak on page reload.
Our approach instead is using an integer in the expando, which points to an index in an array. That array holds the list of functions listening to the event, which is them fired by our custom dispatcher, which btw abstracts the event object too. The final result is that we have no reference to JS objects in the DOM, avoiding having to destroy the reference on unload.
To summarize... we should be in the right track in this sense.
Frederico Knabben
CKEditor Project Lead and CKSource Owner
--
Follow us on: Twitter | Facebook | Google+ | LinkedIn
Re: DOM Abstraction and Memory Leak Free
Is using a 3rd party framework such as jQuery being considered? (http://www.jquery.com) Since I already use it in many of my projects, the overall result would probably be a reduction in JS weight - since I am already loading jQuery, and FCK's code would be far lighter without implementing its own DOM manipulation. jQuery itself is only 15k with optimal compression.
One criteria to look at might be, what are the most popular Javascript frameworks amongst users of FCK?
I could see clear advantages to working with an existing open source framework; the development effort towards abstraction and browser compatibility is combined across the community, and projects like FCK can focus solely on their features and interface.
Re: DOM Abstraction and Memory Leak Free
You can see previous comment about using other frameworks in viewtopic.php?f=11&t=8437 as well as in other threads.
Re: DOM Abstraction and Memory Leak Free
Frederico Knabben
CKEditor Project Lead and CKSource Owner
--
Follow us on: Twitter | Facebook | Google+ | LinkedIn
Re: DOM Abstraction and Memory Leak Free