/    Sign up×
Community /Pin to ProfileBookmark

Slow performance from FireFox in event capturing

Hello,
I need some help! I’m getting a very bad performance in my code from FireFox with event capturing. The memory usage at page load on my computer is 22mb for FireFox but shoots right up to 30mb and soon as I start triggering some of my events on my page. IE is unaffected.

I’m creating a new contextmenu script designed to run crossbrowser in an application environment. I have one main event handler function that processes every event on the page.

The problem I am having is when I hover over a menu item, this is what causes the slow performance. FireFox takes forever to add the correct classes or remove the classes from the item. Below is the HTML code that the script generates for an individual menu:

[code]
<div id=”menu1″ class=”hide”>

<div class=”scroller”></div>

<div class=”itemCont”>

<a href=”link.htm” class=”item itemHeader”>

<div class=”icon”></div>
<div class=”caption”>Hello!</div>
<div class=”menuicon”></div>

</a>

<a href=”link.htm” class=”item”>

<div class=”icon”></div>
<div class=”caption”>Hello!</div>
<div class=”menuicon”></div>

</a>

<div class=”divider”></div>

<a href=”link.htm” class=”item itemActive”>

<div class=”icon”></div>
<div class=”caption”>Hello!</div>
<div class=”menuicon”></div>

</a>

</div>

<div class=”scroller”></div>

</div>
[/code]

I think the problem is that the mouseover event is fireing twice on each item if I hover over one of the DIV’s inside the link.

I’ve uploaded my work to see the code in action. The address is:
[url]www.adamsvoid.95mb.com/showcase/contextmenu4/index.htm[/url]

Thank you very much
Adam

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@lightning_htmlauthorNov 16.2005 — Sorted it. It was my own debug screen. There is a performance issue with updating it everytime an event or something happens.
Copy linkTweet thisAlerts:
@Stephen_PhilbinNov 16.2005 — I've read that both IE and Gecko based browsers leak memory when nodes in a document are referenced via the W3C DOM, I experience it on my own work too, but I don't seem to be getting anything major from that page. The memory leak usually builds up very slowly and gradually. When I've had firefox open for about a week, then it can easily take up a few hundred megabytes of RAM, but Just killing it and then restarting it reclaims the RAM for me and I can't imagine there's many other folks that would have Firefox up and running for a week straight.
×

Success!

Help @lightning_html spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...