Hello List,

I'm using a large table with 12 columns in my application where users 
complained about slow scrolling performance when dragging the vertical 
scroll button.

I did some profiling using firebug and found following time consuming 
spots in the table implementation:

1) The BooleanDataCellRenderer which used a checkmark image to visualize 
the boolean state is slow (we have two columns in this table).

Rendering the checked/unchecked image consumed a lot of time so I 
decided to write a boolean data cell renderer which uses a black circle 
utf-8 character (●) as a "true" mark. "false" is left blank.

In order to allow setting the cell value via textNode.nodeValue, I 
inserted the character directly into the javascript sourcefile as a 
utf-8 character. Setting only the text node value is much faster then 
setting innerHTML. Entities must be set through innerHTML. The decision 
for the black circle was made because this character is supported by all 
browsers (the checkmark unicode character is not supported by IE).

The soucecode can be downloaded from 
http://bugzilla.qooxdoo.org/attachment.cgi?id=132



2) The DefaultDataCellRenderer implementation is very costly regarding 
date and number formatting.

Because formating was already done by our server backend, the solution 
to this was to write a data cell renderer which only assignes the cell 
html value.
 This cell renderer can be used for text only columns which do not need 
any localization and formating.

The code of DirectDataCellRenderer.js can be downloaded from 
http://bugzilla.qooxdoo.org/attachment.cgi?id=133




3) The TablePaneScroller implementation fired a lot of time consuming 
setScrollLeft and setScrollTop method calls even if the values of left 
and top did not change. Because the mousemove event was attached to the 
pane scroller, which also includes the vertical scrollbar, the 
eventhandler was fired without a need.

I splitted the mousemove, mouseup and mousedown eventhandlers for the 
pane and the header and attached them separately so no mouse move event 
is fired if the vertical scrollbutton is dragged.

Aditionally I buffered the parameters of the scrollLeft ans scrollTop 
and did the calls only if the parameters changed.

The patch against qooxdoo 0.6.6 can be downloaded from 
http://bugzilla.qooxdoo.org/attachment.cgi?id=131


In our case the scroll performace, especially the scrolling by dragging 
the vertical scroll bar is now three to five times faster compared to 
the performance before I did the optimizations.

I've filed this as an enhancement bug in bugzilla.qooxdoo.org:

http://bugzilla.qooxdoo.org/show_bug.cgi?id=330




-- 

Mit freundlichen Grüßen
Dietrich Streifert
--
Visionet GmbH
Firmensitz: Am Weichselgarten 7, 91058 Erlangen
Registergericht: Handelsregister Fürth, HRB 6573
Geschäftsführer: Stefan Lindner




-------------------------------------------------------------------------
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
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to