-
Notifications
You must be signed in to change notification settings - Fork 867
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
do not fetch topsite information if not shown #5486
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
++
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great. Small change requested so far.
Do we have a simple test plan with a sample data set that can be used to confirm the issue is fixed and the performance impact? |
@petemill I think this PR goal is just not to call any chrome API if users disabled the feature |
correct, and to call search api with a different parameter (per https://developer.chrome.com/extensions/bookmarks#method-search) Can share bookmarks used for testing |
Sure but we still need to validate that turning the API request off fixes the issue users have encountered and we can do that with test data. |
If you can, please squash the "code review comments" in to the PR commit so we can keep the changes together and easier to explain when looking in the future |
25f110a
to
53619ee
Compare
PTAL |
Seems to be getting a build error, which makes sense. @AndriusA @cezaraugusto are you not getting this error?
|
weirdly - no, locally everything seemed fine. Possibly something didn't get picked up for incremental build. Feel free to fix it up or throw out altogether, looks like assumptions about every source of data always being there are baked in all the way, even if user has disabled them |
@AndriusA if this is P1 we should definitely fix, right? Might be as simple as setting the correct nullable type on 1 property in the store. Do you know the rough perf improvement on the change of |
that's made obsolete by #5490 so we may not have a major performance issue on it for now the |
Relates to brave/brave-browser#9481
Mitigates performance issues with topsites when user has thousands of bookmarks (see brave/brave-browser#9481 (comment)) by not fetching topsite information when the widget is disabled.
Looking at chromium side of bookmarks code, looking up by
{ url: url }
goes to execution path that checks URL index as a hashmap, vs. looking up by justurl
having to iterate the entire list of all the bookmarks each time (the former is faster when done).Submitter Checklist:
npm run lint
)git rebase master
(if needed).git rebase -i
to squash commits (if needed).Test Plan:
Reviewer Checklist:
After-merge Checklist:
changes has landed on.