Comments (21)
A few things that fixed a very similar extension I worked on about a month ago are to:
- Query information from background scripts (eliminates dropped frames but doesn't help overall speed)
- Give data to the content script, then use simple JS operations like
.includes
to filter and give top results, then wait for data from background script for fuzzy searching, this means that a few results will appear instantly, and it'll take as long as it normally takes to get all results. - Memoize searching (this is super easy to do)
- Use a popular, high performance library for searching, like Fuse.js, and then experiment with settings (for Fuse specifically, setting threshold lower really helps)
- Don't send any unnecessary data to the client, even small things, like
.slice
ing the results to 25 really helped the speed
from omni.
I'll look into optimizing the extension. I think I could do something similar to what I do for searching the browser history (not sure if that lags for you?) and that should solve it. Also add a limit to the entries that get added.
Debounce should solve the while typing problem.
from omni.
Yeah, these are good ideas, thanks! Will work on it :)
from omni.
I can confirm the performance is now much better and I don't see any lag 👌 @alyssaxuu The only issue I see now is that the chrome tab image seems to be missing:
But in terms of performance all good 👍 Feel free to close the issue!
Glad to hear!
Regarding the broken image, you can open a separate issue for it if you'd like. I am aware of the issue, but have been unable to solve it. I've tried adding an onerror + onload event to the images, with a fallback to an icon if the image didn't load properly, but for some reason it doesn't always work. I will need to investigate further.
from omni.
I'll look into optimizing the extension. I think I could do something similar to what I do for searching the browser history (not sure if that lags for you?) and that should solve it. Also add a limit to the entries that get added.
from omni.
Ok, I have made multiple changes (only show 100 bookmarks at first, search in the background, no re-rendering on every keypress...), let me know what you think!
from omni.
Ok, I have made multiple changes (only show 100 bookmarks at first, search in the background, no re-rendering on every keypress...), let me know what you think!
Awesome! Still though, rendering 100 dom elements can lag computers, especially for people who's computer isn't that powerful, I can imagine this extension working amazingly on mac, but it's practically unusable for me due to the slow speed. You can search all bookmarks in the background script, then return the top 30 or so matches, you might even be able to add infinite scroll type thing.
from omni.
Ok, I have made multiple changes (only show 100 bookmarks at first, search in the background, no re-rendering on every keypress...), let me know what you think!
Awesome! Still though, rendering 100 dom elements can lag computers, especially for people who's computer isn't that powerful, I can imagine this extension working amazingly on mac, but it's practically unusable for me due to the slow speed. You can search all bookmarks in the background script, then return the top 30 or so matches, you might even be able to add infinite scroll type thing.
Yeah that works! I will look into implementing this, so it renders as you scroll.
from omni.
Hello @alyssaxuu,
I like a lot your extension! :)
I have a question for you: why when I press cmd+k I can't write immediately but I have to move the cursor with the mouse on the search bar. It's possibile start to write after the shortcut?
I am attaching the screenshots of some graphic problems:
Thanks a lot!
from omni.
Hello @alyssaxuu, I like a lot your extension! :)
I have a question for you: why when I press cmd+k I can't write immediately but I have to move the cursor with the mouse on the search bar. It's possibile start to write after the shortcut?
I am attaching the screenshots of some graphic problems:
Thanks a lot!
That's odd, it might be specific to a website. It should definitely focus the input after pressing command+k. Is this happening in all websites or in just one?
from omni.
That's odd, it might be specific to a website. It should definitely focus the input after pressing command+k. Is this happening in all websites or in just one?
All website!
from omni.
That's odd, it might be specific to a website. It should definitely focus the input after pressing command+k. Is this happening in all websites or in just one?
All website!
What OS / browser are you using?
from omni.
That's odd, it might be specific to a website. It should definitely focus the input after pressing command+k. Is this happening in all websites or in just one?
All website!
What OS / browser are you using?
macOS/Chrome
from omni.
That's odd, it might be specific to a website. It should definitely focus the input after pressing command+k. Is this happening in all websites or in just one?
All website!
What OS / browser are you using?
macOS/Chrome
Are you using any other extensions? They could be causing some sort of conflict.
from omni.
That's odd, it might be specific to a website. It should definitely focus the input after pressing command+k. Is this happening in all websites or in just one?
All website!
What OS / browser are you using?
macOS/Chrome
Are you using any other extensions? They could be causing some sort of conflict.
Of course a lot of others extensions!
from omni.
That's odd, it might be specific to a website. It should definitely focus the input after pressing command+k. Is this happening in all websites or in just one?
All website!
What OS / browser are you using?
macOS/Chrome
Are you using any other extensions? They could be causing some sort of conflict.
Of course a lot of others extensions!
Ah well, in that case that's probably why you're having issues. You can try disabling them to see which one causes the issue. But can't really do anything about it otherwise.
from omni.
Perhaps the graphic problems are due to Content Security problems? Maybe check your console? This would be a pretty simple fix, just by adding onerror='this.remove()'
to each image element, or maybe a placeholder emoji or something like that.
from omni.
That's odd, it might be specific to a website. It should definitely focus the input after pressing command+k. Is this happening in all websites or in just one?
All website!
What OS / browser are you using?
macOS/Chrome
Are you using any other extensions? They could be causing some sort of conflict.
Of course a lot of others extensions!
Ah well, in that case that's probably why you're having issues. You can try disabling them to see which one causes the issue. But can't really do anything about it otherwise.
Okok, im going to try it!
I found this problems in the extensions chrome tab:
from omni.
Perhaps the graphic problems are due to Content Security problems? Maybe check your console? This would be a pretty simple fix, just by adding
onerror='this.remove()'
to each image element, or maybe a placeholder emoji or something like that.
There is actually an onerror callback on the images, but it doesn't seem to work all the time. There's even an onload callback to check if the image has dimensions just in case.
from omni.
I can confirm the performance is now much better and I don't see any lag 👌 @alyssaxuu
The only issue I see now is that the chrome tab image seems to be missing:
But in terms of performance all good 👍 Feel free to close the issue!
from omni.
That's odd, it might be specific to a website. It should definitely focus the input after pressing command+k. Is this happening in all websites or in just one?
All website!
What OS / browser are you using?
macOS/Chrome
Are you using any other extensions? They could be causing some sort of conflict.
Of course a lot of others extensions!
Ah well, in that case that's probably why you're having issues. You can try disabling them to see which one causes the issue. But can't really do anything about it otherwise.
I disabled all the extensions except omni, it still doesnt works!
from omni.
Related Issues (20)
- What is the logic of direct search results?
- [Suggestion] Add command to move tab to another window HOT 1
- favIconUrl is sometimes undefined on action (tab) (Firefox only?) HOT 1
- Option to remove a bookmark
- Google Docs Header Switching
- [Suggestion] Add chatGPT command
- Feature Request: Custom inputs for Commands HOT 1
- exams
- New bookmarks have not been updated
- Plugin doesn't open sometimes
- [feature request] fuzzy search
- Unexpected requests to `/users/undefined` causing unwanted 404 in Rails-based webapp
- The style displayed when bookmarking the protected script is incorrect
- Doesn't work in new tab
- how to open tab when search? HOT 1
- Feature Request: Integrate actions with Firefox Containers
- Add the ability to switch chrome profile
- Allow Omni to search URLs as well as Tab Titles.
- Incorrect system theme on Gnome HOT 1
- Invalid browser settings URI on Firefox
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from omni.