Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
base2-dom slow to load in Firefox - firebug + javascript.options.strict = true are the culprits
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Follow-up To:
Add Cc | Add Follow-up to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers that you hear
 
Alex Robinson  
View profile   Translate to Translated (View Original)
 More options 26 Aug 2007, 13:56
From: Alex Robinson <solidgold...@gmail.com>
Date: Sun, 26 Aug 2007 18:56:56 +0100
Local: Sun 26 Aug 2007 13:56
Subject: base2-dom slow to load in Firefox - firebug + javascript.options.strict = true are the culprits
Short version
-------------

Problem:
The current version of Base2 (timestamp: Fri, 10 Aug 2007 20:00:50)
will load extremely slowly in Firefox if you have Firebug enabled and
the preference javascript.options.strict set to true.

Solution:
Set javascript.options.strict to false

Long version
------------

I just started using the latest version of Base2 in subversion. And
it's taking 35 seconds plus just to load the Dom part of Base2.

In Firefox (2.0.0.6) with Firebug (1.05) enabled and the preference
javascript.options.strict set to true, that is. Disable Firebug or
set the strict pref to false and it loads up ok, ( ~600ms vs
~36000ms). (All other browsers obviously are unaffected)

To reproduce the problem, toggle the javascript.options.strict
preference and visit the following pages.

Loading Base2 locally
    http://www.fu2k.org/alex/javascript/javascriptjunk/base2load

and externally from Google repository (just to check not a local
glitch on my part)
    http://www.fu2k.org/alex/javascript/javascriptjunk/base2loadexternal

gives pretty much the same results:
    http://www.fu2k.org/alex/javascript/javascriptjunk/base2loadprofile

(just to be clear, the slow loading is happening when the profiling is off)

On the other hand, using a previous version of Base2 loads just fine
and snappy, even if strict mode is on.

http://www.fu2k.org/alex/javascript/javascriptjunk/base2load-jul07
// timestamp: Tue, 03 Jul 2007 20:32:36

You can see why it takes longer if you compare the console output
from the current and the old versions.
    http://www.fu2k.org/alex/javascript/javascriptjunk/base2load-warnings
    http://www.fu2k.org/alex/javascript/javascriptjunk/base2load-jul07-wa...

Patching base2.js as suggested below...

999c999
<       if (object.extend == extend && /^(base|extend)$/.test(key)) {
---

>        if (object.extend && object.extend == extend &&
>/^(base|extend)$/.test(key)) {

1051c1051
<   while (fn && fn.ancestor != ancestor) fn = fn.ancestor;
---

>    while (fn && (!fn.ancestor || fn.ancestor != ancestor)) fn =
>fn.ancestor ? fn.ancestor : undefined;

    http://www.fu2k.org/alex/javascript/javascriptjunk/base2load-patched

... makes the glacial speed issues go away, but seeing as my
javascript foo is not so great, I assume that breaks stuff left,
right and centre. It certainly opens up a new wave of warnings from
functions not always returning a value and hiding of arguments and
this:

Warning: reference to undefined property Native.prototype[name]
Source File: http://www.fu2k.org/alex/javascript/base2/base2-patched.js
Line: 959

-->     INative[name] = unbind(Native.prototype[name]);

Not knowing what the project's position is on strictness, and given
my foo, it seems a good point at which to stop my amateur sleuthing,
though I hope it has been of some help.

In the meantime, the trivial solution is just to make sure that
javascript.option.strict is set to false. Or alternatively use
Console2 to filter the error console messages

https://addons.mozilla.org/en-US/firefox/discussions/comments.php?Dis...


 
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Alex Robinson  
View profile   Translate to Translated (View Original)
 More options 28 Aug 2007, 12:25
From: Alex Robinson <solidgold...@gmail.com>
Date: Tue, 28 Aug 2007 09:25:01 -0700
Local: Tues 28 Aug 2007 12:25
Subject: Re: base2-dom slow to load in Firefox - firebug + javascript.options.strict = true are the culprits

> Solution:
> Set javascript.options.strict to false

Just to be painstakingly clear, I meant that is the short term
solution so that you can actually keep working until Dean fixes things
up. Not that you should set  javascript.option.strict to false forever
and ever.

 
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dean Edwards  
View profile   Translate to Translated (View Original)
 More options 28 Aug 2007, 13:13
From: Dean Edwards <d...@edwards.name>
Date: Tue, 28 Aug 2007 18:13:49 +0100
Local: Tues 28 Aug 2007 13:13
Subject: Re: [base2] Re: base2-dom slow to load in Firefox - firebug + javascript.options.strict = true are the culprits

Alex Robinson wrote:
>> Solution:
>> Set javascript.options.strict to false

> Just to be painstakingly clear, I meant that is the short term
> solution so that you can actually keep working until Dean fixes things
> up. Not that you should set  javascript.option.strict to false forever
> and ever.

I am fixing this in the base2 core as Alex mentioned:

http://dean.edwards.name/weblog/2007/08/firebug-slow/

-dean


 
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »