Thursday, October 05, 2006

Performance Related Issues with Safari 2.0.x

There are some obvious performance issues with Safari.

TEXTAREA used in TABLEs

This is very common problem within some corporate application when trying to deal with any aspect of a table that has many TEXTAREA tags. The symptoms are a page that is very slow to load, close, update, and refresh. Assuming there is one TEXTAREA tag per table cell. Depending upon the processor power of the Mac this may occur with as few as 35 columns with 10 rows to about 30 rows before the response time starts to become unacceptable.

These performance issues do not exist if the TEXTAREA is replaced by DIV elements and performance can be increased by a factor of about 1500% by using DIV elements instead!

My guess as to the cause of this that TEXTAREA elements are defined in terms of “rows” and “cols”. These values do NOT directly map back to the W3C standard units of measurements and I suspect that there is a problem in the translation of rows and cols.

It is an incorrect usage of the TEXTAREA element to used for formatting of a table cells or other parts of the HTML document. CSS should be used instead. I suspect it was just easier for some programmers to specify container size in terms of rows and columns.

Large Select Statements

Safari tends to have performance issues when a single select statement may have well over a few thousand entries. An example would be the pick lists for issues such as routing comments.

There is basically nothing that can be done for these situations except for perhaps reducing the number of entries in the list, which may not be appropriate. Businesses should be more aware of the nature of the user interface than to expect the user to literally scroll through thousands of entries in a list.


Some Links

http://www.w3.org/TR/html4/interact/forms.html#h-17.7 - TEXTAREA as defined by the HTML v4.1 standards

No comments: