Live data from Hacker News

In-Field Labels: A Better Way + jQuery Plugin

fuelyourcoding.com

21–25 of 25 posts

Re: In-Field Labels: A Better Way + jQuery Plugin

#21
Assuming, on the examples page, that there is no javascript being executed on page load except the initialization of the examples:

For six form fields, it took 500ms (according to firebug's profiler) to initialize on a 2.4ghz core 2 duo. Granted, I'm using Firefox 3, and not 3.5.

I'm assuming that this scales linearly with each form element that this trick is applied to, in which case a page with 12 form elements would take 1 full second to initialize the javascript.

I'd stay away from this if you have more than two form elements using it. It's bound to slow down the user experience unbearably.

Re: In-Field Labels: A Better Way + jQuery Plugin

#22

Assuming, on the examples page, that there is no javascript being executed on page load except the initialization of the examples: For six form fields, it took 500ms (according to firebug's profiler) to initialize on a 2.4ghz core 2 duo. Granted, I'm using Firefox 3, and not 3.5. I'm assuming that this scales linearly with each form element that this trick is applied to, in which case a page with 12 form elements wou…

I think you are including the jQuery load time as part of your example. If you have nothing else on the page (no other jQuery, etc) then don't use a plugin.

On the examples page, I profiled the five InFieldLabel calls at a total of just over 28ms. Firefox 3.5, 2.2 Ghz Core Duo. Its not the field calls that take 500ms, even in Firefox 3.0.

Re: In-Field Labels: A Better Way + jQuery Plugin

#25

Assuming, on the examples page, that there is no javascript being executed on page load except the initialization of the examples: For six form fields, it took 500ms (according to firebug's profiler) to initialize on a 2.4ghz core 2 duo. Granted, I'm using Firefox 3, and not 3.5. I'm assuming that this scales linearly with each form element that this trick is applied to, in which case a page with 12 form elements wou…

I think you are including the jQuery load time as part of your example. If you have nothing else on the page (no other jQuery, etc) then don't use a plugin. On the examples page, I profiled the five InFieldLabel calls at a total of just over 28ms. Firefox 3.5, 2.2 Ghz Core Duo. Its not the field calls that take 500ms, even in Firefox 3.0.

Well, if the jQuery library is loaded (file-wise), and nothing is used from it - well, nothing should init.

What I profiled as taking that long was the jQuery init functions, which I assumed were required (and called by) the plugin.

Then again, I'm not as familiar with jQuery as I once was. All I know is that I don't like method chaining (impossible to set mid-line breakpoints and try/catch blocks), the extended element (if it's anything like prototype) is extremely heavy and not needed a majority of the time, and if you use massive amounts of it (see: slashdot) the user experience is deleteriously affected.

And really, 500ms initialization (even if it's jQuery and not the plugin initializing, that's a long time) for a user-experience-worsening toy like this.. I don't see the point.

Post reply on HN