Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Faster Loading through jQuery

Reply
Thread Tools

Faster Loading through jQuery

 
 
David Mark
Guest
Posts: n/a
 
      12-18-2009
http://groups.google.com/group/jquer...8cade148bdafa5

"I debugged a tricky problem today in an app that came down to jQuery
hanging IE."

I am sorry to hear _that_. I'd be glad to help you with this
problem.

"I know v1.1.2 is ancient, but I am trying to understand the root
cause, so I'm just curious if anyone else has seen anything like this.
Just trying to gather info."

Now, what sort of irresponsible space-case would use jQuery 1.1x?
Perhaps they are unable to upgrade due to broken compatibility? That
rings a bell.

"The problem:"

_A_ problem.

"On one page in a webapp, the content is fully delivered but IE
continues showing the "spinner" and "Waiting for ..." appears in the
status bar. jQuery's ready() event doesn't fire and IE just hangs in
that state."

Wonderful! Sorry, I meant that's a shame.

"Here is the info:
1) jQuery 1.1.2, IE7 on a dual-core HP laptop"

There it is. See above.

"2) Problem only happens in above configuration, and even then it is
"random". When BIOS is changed to disable dual-core, problem
disappears"

In fifteen years, I've never encountered such a thing. Of course, I
don't rely on fossilized code monkey droppings either.

"3) When the IE "hack" to detect domcontentloaded is removed from the
jQuery source (and window.onload is used instead), the problem
disappears"

Told you so (repeatedly). But perhaps I don't understand what
"programmers" _really_ need from an API.

"Apparently, the hack of inserting the <script defer=true src=//:> tag
is what causes the browser to go into the hung state. I'm not really
sure what IE does internally when this kind of tag is inserted, but
somehow it is triggering a problem."

Curiouser and curiouser.

"I suspect that there is an underlying problem with IE or perhaps the
drivers, or perhaps the hardware or something, and jQuery is just
exposing the underlying problem."

Hacks are good for that. What made you think this one would work
reliably? Because it is in jQuery?

And if there is one event you don't want to blow, it's load. It's
not as if this hack is going to make your app "load faster".

"So, if anyone has ever seen a problem like this, please let me know
so I can try to get a little more info. Thanks!"

Who cares if anyone (else) has seen it? Programming by collaborative
misunderstanding is what led to this. There are three solutions:-

1. Stop using jQuery
2. Create your own patched jQuery (and hope this was an isolated screw-
up).

Of course, we know there is far more wrong with jQuery (particularly
the older versions) than this one line deferred script hack. Seems
like a major waste of time to monkey around with the thing every time
a new bug is reported. And even if upgrading were possible, it
wouldn't help this issue as that hack is still present (and in the
other "majors" as well). Good luck!

This adjacent post is an illuminating look into the jQuery design/
development process:-

http://groups.google.com/group/jquer...8f2906be4d4491

Things can only get better from here.

As for the community efforts:-

http://groups.google.com/group/jquer...652ea60a4f5db2

"I got bit by a number of bugs in the Color Animations plugin. So, I
fixed them and uploaded the fix to the comments on the issue I
submitted against it.

Then I noticed, other people have submitted patches as far back as
almost 2 years ago. So it looks like this module is no longer being
actively maintained."

And the 2009 Summit on Attributes and Heights is still ongoing. No
consensus yet.

http://groups.google.com/group/jquer...ef5e91bd714033
 
Reply With Quote
 
 
 
 
Matt Kruse
Guest
Posts: n/a
 
      12-18-2009
On Dec 18, 10:18*am, David Mark <(E-Mail Removed)> wrote:
> Now, what sort of irresponsible space-case would use jQuery 1.1x?


An old app developed some time ago, by a group that I am not a part
of, for a company I do not work with.

> "2) Problem only happens in above configuration, and even then it is
> "random". When BIOS is changed to disable dual-core, problem
> disappears"
> In fifteen years, I've never encountered such a thing.


Nor have I. But this isn't about jQuery, it's about trying to find the
real underlying problem. jQuery just exposes it, through a
questionable technique that is no longer used.

> Hacks are good for that. * *What made you think this one would work
> reliably? *Because it is in jQuery?


I didn't think anything. I didn't write it.

> And if there is one event you don't want to blow, it's load. * *It's
> not as if this hack is going to make your app "load faster".


Indeed, I have patched the jQuery source being used to revert to
window.attachEvent().

> "So, if anyone has ever seen a problem like this, please let me know
> so I can try to get a little more info. Thanks!"
> Who cares if anyone (else) has seen it?


Because I'm trying to isolate the root cause. Any morsels of info or
related cases or brainstorming might help me go down the right path.
It's very confusing, and even Microsoft punted on finding the cause,
before I narrowed it down.

> And even if upgrading were possible, it
> wouldn't help this issue as that hack is still present (and in the
> other "majors" as well). *


No it's not, AFAIK.

> http://groups.google.com/group/jquer...8f2906be4d4491
> http://groups.google.com/group/jquer...652ea60a4f5db2
> http://groups.google.com/group/jquer...ef5e91bd714033


Patrolling a group discussion between developers on a library which
you so highly despise, in an attempt to find things you can criticize
in public... that's pretty pathetic. But whatever.

Matt Kruse
 
Reply With Quote
 
 
 
 
David Mark
Guest
Posts: n/a
 
      12-18-2009
On Dec 18, 12:03*pm, Matt Kruse <(E-Mail Removed)> wrote:
> On Dec 18, 10:18*am, David Mark <(E-Mail Removed)> wrote:
>
> > Now, what sort of irresponsible space-case would use jQuery 1.1x?

>
> An old app developed some time ago, by a group that I am not a part
> of, for a company I do not work with.


Oh, it's for a friend? Well, they brought in the right guy.

>
> > "2) Problem only happens in above configuration, and even then it is
> > "random". When BIOS is changed to disable dual-core, problem
> > disappears"
> > In fifteen years, I've never encountered such a thing.

>
> Nor have I. But this isn't about jQuery, it's about trying to find the
> real underlying problem. jQuery just exposes it, through a
> questionable technique that is no longer used.


LOL. That's some spin. Take out that line and see that it suddenly
"works" again.

>
> > Hacks are good for that. * *What made you think this one would work
> > reliably? *Because it is in jQuery?

>
> I didn't think anything. I didn't write it.


But you use it and endorse it as safe for neophytes.

>
> > And if there is one event you don't want to blow, it's load. * *It's
> > not as if this hack is going to make your app "load faster".

>
> Indeed, I have patched the jQuery source being used to revert to
> window.attachEvent().
>
> > "So, if anyone has ever seen a problem like this, please let me know
> > so I can try to get a little more info. Thanks!"
> > Who cares if anyone (else) has seen it?

>
> Because I'm trying to isolate the root cause. Any morsels of info or
> related cases or brainstorming might help me go down the right path.


You already did. It's that one line. I told you to take it out years
ago.

> It's very confusing, and even Microsoft punted on finding the cause,
> before I narrowed it down.


Confusing? You rely on something you don't understand, you get burned
(badly in this case).

>
> > And even if upgrading were possible, it
> > wouldn't help this issue as that hack is still present (and in the
> > other "majors" as well). *

>
> No it's not, AFAIK.
>
> >http://groups.google.com/group/jquer...8f2906be4d4491
> >http://groups.google.com/group/jquer...652ea60a4f5db2
> >http://groups.google.com/group/jquer...ef5e91bd714033


They finally took that out? Great. It's still in several other
"majors" for sure. And, of course, this herculean community effort
didn't retroactively fix your version (or the one used by this other
team). So, none of your arguments for jQuery (e.g. community, lots of
bug fixes, etc.) add up.

>
> Patrolling a group discussion between developers on a library which
> you so highly despise, in an attempt to find things you can criticize
> in public... that's pretty pathetic. But whatever.


Patrolling? It's on today's front page. And that group is moderated,
so you can't get my help there. We've been over all of this.

Glad I could help. Delete that line and you'll be (sort of) set.
Better still, delete jQuery (or bite the bullet and upgrade to the
latest vapor).

On a side note, I see the Attribute and Height Symposium is going
well. The move to deprecate attr('height') based on observations
reported here was unexpected (as was the decision to "forget" XML).
So now, is that completely gone or will it just read the height
property now? Or is that one of the "special" cases that reads an
attribute value instead? And what was the consensus on attr('width')?

It seems odd that such a meeting of minds would take place weeks
before the decade ends (and three years after this script was
written). It casts a lot of doubt on the reliability of anything
written on top of it.

Oh, and you might want to add the "other attr" (in the query logic) to
the agenda.
 
Reply With Quote
 
David Mark
Guest
Posts: n/a
 
      12-18-2009
On Dec 18, 12:39*pm, David Mark <(E-Mail Removed)> wrote:

[...]

>
> Oh, and you might want to add the "other attr" (in the query logic) to
> the agenda. *


Then I see it is too late. The attr "resolution" is to (more or less)
leave it alone, "just working" in whatever way people have grown
accustomed (for the particular version of jQuery they are stuck
with). Like this:-

http://groups.google.com/group/jquer...582786ca2195c2

I guess removeAttr and the similarly botched logic in the query code
was tabled for another decade. And what about that height method?
Try as I do, I can't find a single facet of this thing that is
consistent (except the confusion). Browsers today are a much better
story and have real documentation.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Microsoft expanding it use of jQuery & involvement with jQuery lorlarz Javascript 6 03-25-2010 10:14 PM
What do you think about jquery, asp.net and release software faster Big George ASP .Net 1 08-29-2009 10:24 PM
Simpler loading through jQuery David Mark Javascript 34 06-27-2009 02:01 AM
jQuery Query about comparing jQuery references Aaron Gray Javascript 20 07-27-2008 01:53 PM
[OT] Is loading the second Java application faster than loading the first? David Segall Java 2 01-02-2007 04:41 PM



Advertisments