Closed
Bug 146048
Opened 24 years ago
Closed 24 years ago
image context menu is slow when image blocking is active
Categories
(Core :: Graphics: Image Blocking, defect)
Tracking
()
VERIFIED
DUPLICATE
of bug 115818
People
(Reporter: tomi.leppikangas, Assigned: morse)
Details
(Keywords: perf)
Attachments
(1 file)
|
1.60 KB,
patch
|
morse
:
review+
waterson
:
superreview+
|
Details | Diff | Splinter Review |
From bug #77051
When there is lot of sites listed in cookie or image block list, image
contextmenu is slow. I have 8 image block sites and about 500 cookie
block sites and after right clicking on image opening popup takes
about 2secs.
Steps to reproduse:
1. get lots of sites to image or cookie blockin list (maybe some scripts
that adds sites to profile/cookperm.txt)
2. right click on image
Actual results:
Takes about 2-3sec to open menu.
Expected:
Menu opens instantly.
I hacked patch that shows the problem:
extensions/cookie/resources/content/cookieContextOverlay.xul:
initImageBlocking : function () {
try {
// Block image depends on whether an image was clicked on, and,
// whether the user pref is enabled.
/***********************************************************************
gContextMenu.showItem
("context-blockimage",
gContextMenu.onImage && cookieContextMenu.isPrefSet() &&
cookieContextMenu.isBlockingImages());
gContextMenu.showItem
("context-unblockimage",
gContextMenu.onImage && cookieContextMenu.isPrefSet() &&
!cookieContextMenu.isBlockingImages());
********************************************************************/
} catch (e) {}
},
When that code is commented out menus works instantly.
| Assignee | ||
Updated•24 years ago
|
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla1.2alpha
| Reporter | ||
Comment 1•24 years ago
|
||
When comparing how image blocking is handled in
cookieNavigatorOverlay.xul and cookieContextOverlay.xul
there seems to be some differencies.
cookieNavigatorOverlay.xul uses function
permissionmanager.testForBlocking(window._content.location,IMAGEPERMISSION)
and cookieContextOverlay.xul travels list line by line.
Can cookieContextOverlay.xul use that testForBlocking() function too?
Keywords: perf
Target Milestone: mozilla1.2alpha → ---
| Reporter | ||
Comment 2•24 years ago
|
||
| Assignee | ||
Comment 3•24 years ago
|
||
Comment on attachment 84679 [details] [diff] [review]
patch that uses testForBlocking() for site search
looks good to me.
r=morse
Attachment #84679 -
Flags: review+
Having well over 5000 image domains blocked (I generated a list of akamai
domains) :) contextmenu on images takes over 10 seconds to appear.
Going to apply the patch myself in a moment to test a bit, but I'm feeling
hopeful. uhm, nominating for mozilla 1.0 is not much use anymore, but should we
then nominate for mozilla 1.0.1?
OS: Linux → All
*drools and applies the patch to all his builds*
Works like a dream. Thank you! :)
I did notice you used tabs in the patch though. Please replace those by spaces.
Comment 6•24 years ago
|
||
Comment on attachment 84679 [details] [diff] [review]
patch that uses testForBlocking() for site search
sr=waterson
Attachment #84679 -
Flags: superreview+
| Reporter | ||
Comment 7•24 years ago
|
||
Morse, can you check this in? I dont have cvs access. Change those
tabs to spaces before checkin.
OS: All → Linux
| Assignee | ||
Comment 8•24 years ago
|
||
OK, checked in on trunk.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Comment 9•24 years ago
|
||
Awww... and I was *so* enjoying the nice, stable 1.0 branch. Haven't crashed in
a long long time. Now I have enough reason to use trunk again. *sigh*. But thanks.
| Reporter | ||
Comment 10•24 years ago
|
||
Verified fixed on linux nightly build 2002052507
Status: RESOLVED → VERIFIED
Comment 11•24 years ago
|
||
Any chance we could get this in the branch as well? Seems pretty low risk to me...
| Assignee | ||
Comment 12•24 years ago
|
||
Actually this is a dup of bug 115818, and the patches in both these reports are
nearly identical. However the patch in 115818 is slightly better in that it:
- has an added check for a null vector, which is a good thing to have
- has a more efficient return. Instead of:
if (X) return false;
return true;
it does simply
return !X;
| Assignee | ||
Comment 13•24 years ago
|
||
This patch has now been backed out of the trunk and the better patch in bug
115818 has been put onto the trunk instead.
| Assignee | ||
Comment 14•24 years ago
|
||
reopening so I can mark this as a dup
Status: VERIFIED → REOPENED
Resolution: FIXED → ---
| Assignee | ||
Comment 15•24 years ago
|
||
*** This bug has been marked as a duplicate of 115818 ***
Status: REOPENED → RESOLVED
Closed: 24 years ago → 24 years ago
Resolution: --- → DUPLICATE
| Reporter | ||
Comment 16•24 years ago
|
||
Verified as dup. Sorry that i didnt see other bug, patch in that
is better.
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•