- a round-trip to a webserver,...
- where the webserver also roundtrips to a database server (a totally different machine, behind a firewall),...
- where the database server has to execute a complex stored procedure against a million or more rows of data, filter and summarize that data to a couple hundred rows, sort it, send it back to web server...
- where the webserver's C# ASPX code must write out the HTML and deliver it to the client's web-browser
Yes, it sounds insane, but it is true - in this case, I was comparing:
using the Yahoo User Interface (YUI) Controls for a project, where the YUI datatable has been used to add formatting and column-sorting to an existing HTML table,...
VS.
...doing the sequence I first described above with round-tripping to the web-server / database-server / etc (which sounds impossibly more complex).I'm even using a 3GHz desktop computer to run the JavaScript, and it is still slow!
The speed-comparison results:
- Yahoo User Interface YUI datatable control - client side JavaScript version: 15 SECONDS!
- Complete round-trip to IIS 6 web-server, SQL-Server, and C# 3.0 code to write out the same formatted HTML: LESS THAN 2 SECONDS!
Talk about an opportunity to tune that YUI Code! Or, is it the JavaScript / ECMAScript interpreter that is so insanely slow on the client? How is this even possible? When I use the YUI datatable to re-sort the 200-300 row local table, it is taking 15+ seconds each time (and that is when using FireFox 2.0 --- did I mention that Internet Explorer IE 6 takes nearly twice as long!!)
How can any code / language be this slow in modern times!!!???
Once again, I find myself remembering how I have felt all along, and still feel the same way, about web-development using HTML, JavaScript, etc -- it's complete rubbish! There are browser incompatibilities galore, rendering inconsistencies everywhere, behavior / event differences, and it is just generally the most screwed up application-development "platform" ever imagined.
The web should be no different than the desktop! Aside from super simplistic static HTML pages or generated HTML (via ASP, DotNet, PHP, Ruby, whatever) a "web site" should be nothing more than a document-presentation site. If you require real "functionality" (i.e., an "application", it is time to do things quite different.
Instead of this current web "application" model where everyone seems to continually try to beat "applications" into the shape of a web-page, we need to instead create true executable applications that run on the client machine natively. It is SO SIMPLE to create an application that can talk to remote databases over TCP/IP and/or through SOAP endpoints, etc., that I can't figure out why everything has to be a "web page" like it is now. You wait: sooner or later people will proclaim the "fat" web-client (a local EXE) the latest and greatest thing that was "invented" or "discovered" or something (instead of admitting it was just ignored and obvious!)
2 comments:
Post a Comment