avoid Exists() calls for search plugin directories in the browser directory provider
Categories
(Firefox :: Search, defect, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox70 | --- | fixed |
People
(Reporter: Gavin, Assigned: ruthra, Mentored)
References
(Blocks 2 open bugs)
Details
(Keywords: main-thread-io, perf, Whiteboard: [good first bug][lang=c++][fxsearch] [fxperf:p2])
Attachments
(5 files, 3 obsolete files)
(deleted),
patch
|
rvitillo
:
review-
|
Details | Diff | Splinter Review |
(deleted),
patch
|
rvitillo
:
review-
|
Details | Diff | Splinter Review |
(deleted),
patch
|
ruthra
:
review+
ruthra
:
feedback+
|
Details | Diff | Splinter Review |
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details |
Updated•11 years ago
|
Comment 2•11 years ago
|
||
Updated•11 years ago
|
Reporter | ||
Comment 3•11 years ago
|
||
Comment 4•10 years ago
|
||
Updated•10 years ago
|
Comment 6•10 years ago
|
||
Comment 8•10 years ago
|
||
Comment 9•10 years ago
|
||
Comment 10•10 years ago
|
||
Comment 11•10 years ago
|
||
Comment 12•10 years ago
|
||
Comment 13•10 years ago
|
||
Comment 14•10 years ago
|
||
Comment 15•10 years ago
|
||
Updated•10 years ago
|
Updated•10 years ago
|
Comment 17•10 years ago
|
||
Reporter | ||
Updated•10 years ago
|
Comment 18•10 years ago
|
||
Updated•10 years ago
|
Comment 19•10 years ago
|
||
Comment 20•10 years ago
|
||
Updated•10 years ago
|
Comment 21•10 years ago
|
||
Comment 22•10 years ago
|
||
Comment 23•10 years ago
|
||
Comment 24•10 years ago
|
||
Comment 25•10 years ago
|
||
Comment 26•10 years ago
|
||
Comment 27•10 years ago
|
||
Comment 28•10 years ago
|
||
Comment 29•10 years ago
|
||
Comment 30•10 years ago
|
||
Comment 31•10 years ago
|
||
Comment 32•10 years ago
|
||
Comment 33•10 years ago
|
||
Comment 34•10 years ago
|
||
Comment 35•10 years ago
|
||
Comment 36•10 years ago
|
||
Comment 37•8 years ago
|
||
Comment 38•8 years ago
|
||
Updated•8 years ago
|
Comment 39•7 years ago
|
||
Updated•7 years ago
|
Updated•7 years ago
|
Updated•7 years ago
|
Updated•6 years ago
|
Comment 40•6 years ago
|
||
Comment 41•6 years ago
|
||
Comment 42•6 years ago
|
||
Comment 43•6 years ago
|
||
Comment 44•6 years ago
|
||
Comment 45•6 years ago
|
||
Florian, what's the current state here? Is this still current, should it still be a good-first-bug, and is the link in comment #44 a good place to start or no?
Comment 46•6 years ago
|
||
(In reply to :Gijs (he/him) from comment #45)
Florian, what's the current state here? Is this still current
Definitely still exists. https://i.imgur.com/GsXHqkS.png shows the stack in today's nightly.
should it still be a good-first-bug,
I doubt it without a mentor.
and is the link in comment #44 a good place to start or no?
A generic link to the search service isn't a good place to start, no.
Mike, is there anybody in your team who could mentor this?
Comment 47•6 years ago
|
||
I guess I can mentor this bug. If the C++ becomes too complicated for me, I'll defer to mak.
Assignee | ||
Comment 48•6 years ago
|
||
Hi
I would like to contribute to mozilla . If this is not assigned to anyone i would like work on it. This will be my first bug and any help or pointers will be really appreciated.
Comment 49•6 years ago
|
||
I would also like to try this as my first bug!
Comment 51•6 years ago
|
||
Ruthra has just reached out to me through email and as soon as there's a patch attached here I can help the assignee out with any problems they might stumble upon!
Comment hidden (typo) |
Assignee | ||
Comment 53•6 years ago
|
||
Hi,
sorry about my last comment. Contents of this page was in my clipboard and accidentally got pasted here. please ignore my previous comment.
Removed Exists() call from DirectoryProvider.cpp. some 31 xpcshell-tests are failing after the change. 27 are from security/manager/ssl/tests/unit directory. Most of them fail at this line https://searchfox.org/mozilla-central/source/security/manager/ssl/tests/unit/head_psm.js#502 with the following error.
Please check the patch file "1003968_u1.diff" attached.
============================================================================================================================
0:02.60 ERROR ReferenceError: Utilbin is not defined at c:/Users/lenovo/mozilla-source/mozilla-central/obj-x86_64-pc-mingw32/_tests/xpcshell/security/manager/ssl/tests/unit/head_psm.js:501
_getBinaryUtil@c:/Users/lenovo/mozilla-source/mozilla-central/obj-x86_64-pc-mingw32/_tests/xpcshell/security/manager/ssl/tests/unit/head_psm.js:501:5
_setupTLSServerTest@c:/Users/lenovo/mozilla-source/mozilla-central/obj-x86_64-pc-mingw32/_tests/xpcshell/security/manager/ssl/tests/unit/head_psm.js:542:19
add_tls_server_setup/<@c:/Users/lenovo/mozilla-source/mozilla-central/obj-x86_64-pc-mingw32/_tests/xpcshell/security/manager/ssl/tests/unit/head_psm.js:358:5
_run_next_test@c:\Users\lenovo\mozilla-source\mozilla-central\testing\xpcshell\head.js:1453:11
run@c:\Users\lenovo\mozilla-source\mozilla-central\testing\xpcshell\head.js:686:9
_do_main@c:\Users\lenovo\mozilla-source\mozilla-central\testing\xpcshell\head.js:224:6
_execute_test@c:\Users\lenovo\mozilla-source\mozilla-central\testing\xpcshell\head.js:527:5
@-e:1:1
============================================================================================================================
Comment 54•5 years ago
|
||
It looks like this bug has stalled out. A patch was posted in comment 52, but it doesn't look like ruthra ever received any feedback - at least, not here in Bugzilla.
ruthra, are you still interested in working on this if I can find someone to give you feedback on it?
Assignee | ||
Comment 55•5 years ago
|
||
I'm definitely interested. Removed the exists() calls as mentioned but its causing couple of test cases to fail, not sure how to proceed from there. Any feedback or guidance will be really appreciated.
Comment 56•5 years ago
|
||
Mike, who did you have in mind for feedback here? :-)
Comment 57•5 years ago
|
||
For giving feedback, I think I can do it, but might pull in a daleharvey or Standard8 for some searchy-bits.
I've started to piece together what we're doing in this file, and your approach looks great, ruthra! I ran the tests locally, and I wasn't able to reproduce the test failures you were hitting in the security/manager/ssl/tests/ directory.
Instead, what I got was failures initializing the SearchService, but I think I've got an idea of how to fix that by telling the SearchService to not freak out if the directories it's trying to access don't exist.
I have a try push cooking here to run the tests in automation: https://treeherder.mozilla.org/#/jobs?repo=try&revision=113967b72b8e3ee3f1392ff0b7ea95f3bafe5f91
Keeping the needinfo on myself to look back on this when the try push has had time to run the tests.
Comment 58•5 years ago
|
||
Hey ruthra, so looking at the try push at https://treeherder.mozilla.org/#/jobs?repo=try&revision=113967b72b8e3ee3f1392ff0b7ea95f3bafe5f91, I believe those failures are all known intermittents, so it looks all green!
The only thing I added in addition to your patch was this change to SearchServices.jsm: https://hg.mozilla.org/try/rev/6f430c8a70d1cccb2992695a6a962643d3d47e44
What that does is prepare the SearchService for the possibility that the DirectoryIterator is going to report back that some directories don't exist (which is expected - that's what your patch allows us to do).
Do you think you could rebase your patch against the most recent tip of mozilla-central, and fold my change in? Then we should get it up for review with Phabricator, setting myself and maybe daleharvey as reviewers. I can walk you through any part of that, just let me know when you get stuck, okay?
Assignee | ||
Comment 59•5 years ago
|
||
This Change removes all call to Exists() in Directory Provider component, which creates the possibility for the componenet to return an empty list. SearchService.jsm is modified to handle this possibility.
Assignee | ||
Comment 60•5 years ago
|
||
hi mike. Changes are made on latest tip and have been uploaded in Phabricator. Requesting for a review.
Comment 61•5 years ago
|
||
Great! Can you fix the formatting issues flagged up by eslint, and the notes I made on the C++ portion of the patch? Thank you!
Comment 62•5 years ago
|
||
Please also remove https://searchfox.org/mozilla-central/rev/428cf94f4ddfb80eebc6028023a7d89eb277791b/browser/base/content/test/performance/browser_startup_mainthreadio.js#558-563 and https://searchfox.org/mozilla-central/rev/428cf94f4ddfb80eebc6028023a7d89eb277791b/browser/base/content/test/performance/browser_startup_mainthreadio.js#680-686
Thanks for working on this bug!
Assignee | ||
Comment 63•5 years ago
|
||
This Change removes all call to Exists() in Directory Provider component, which creates the possibility for the componenet to return an empty list. SearchService.jsm is modified to handle this possibility.
Assignee | ||
Comment 64•5 years ago
|
||
Hi Gijs, corrections are made as per review and i've removed the section pointed by florian as well. Kindly check.
Updated•5 years ago
|
Comment 65•5 years ago
|
||
Comment 66•5 years ago
|
||
Backed out changeset de151ad69bd6 (bug 1003968) for build bustage. CLOSED TREE
Log:
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=262631827&repo=autoland&lineNumber=39699
Push with failures:
https://treeherder.mozilla.org/#/jobs?repo=autoland&revision=de151ad69bd613efce11317b30c51bdeeb936f30
Backout:
https://hg.mozilla.org/integration/autoland/rev/63dc43dba90a00922b7fa994193fa8729e2e3ea4
Comment 67•5 years ago
|
||
(In reply to Dorel Luca [:dluca] from comment #66)
Backed out changeset de151ad69bd6 (bug 1003968) for build bustage. CLOSED TREE
Specifically:
[task 2019-08-21T09:48:24.516Z] 09:48:24 ERROR - browser/components/dirprovider/DirectoryProvider.cpp:137:12: error: unused variable 'rv' [-Werror,-Wunused-variable] [task 2019-08-21T09:48:24.516Z] 09:48:24 INFO - nsresult rv; [task 2019-08-21T09:48:24.516Z] 09:48:24 INFO - ^ [task 2019-08-21T09:48:24.516Z] 09:48:24 INFO - 1 error generated.
Just removing that line should do. I've commented on phabricator as well. :-)
Assignee | ||
Comment 68•5 years ago
|
||
removed the unused variable and updated phab revision D42772
Comment 69•5 years ago
|
||
Comment 70•5 years ago
|
||
bugherder |
Description
•