Git Product home page Git Product logo

Comments (21)

Explosion-Scratch avatar Explosion-Scratch commented on March 29, 2024 4

A few things that fixed a very similar extension I worked on about a month ago are to:

  1. Query information from background scripts (eliminates dropped frames but doesn't help overall speed)
  2. 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.
  3. Memoize searching (this is super easy to do)
  4. Use a popular, high performance library for searching, like Fuse.js, and then experiment with settings (for Fuse specifically, setting threshold lower really helps)
  5. Don't send any unnecessary data to the client, even small things, like .sliceing the results to 25 really helped the speed

from omni.

crashmax-dev avatar crashmax-dev commented on March 29, 2024 2

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.

alyssaxuu avatar alyssaxuu commented on March 29, 2024 1

Yeah, these are good ideas, thanks! Will work on it :)

from omni.

alyssaxuu avatar alyssaxuu commented on March 29, 2024 1

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: image

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.

alyssaxuu avatar alyssaxuu commented on March 29, 2024

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.

alyssaxuu avatar alyssaxuu commented on March 29, 2024

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.

Explosion-Scratch avatar Explosion-Scratch commented on March 29, 2024

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.

alyssaxuu avatar alyssaxuu commented on March 29, 2024

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.

cenzowm avatar cenzowm commented on March 29, 2024

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:
Schermata 2022-01-14 alle 21 39 26
Schermata 2022-01-14 alle 21 39 15

Thanks a lot!

from omni.

alyssaxuu avatar alyssaxuu commented on March 29, 2024

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: Schermata 2022-01-14 alle 21 39 26 Schermata 2022-01-14 alle 21 39 15

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.

cenzowm avatar cenzowm commented on March 29, 2024

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.

alyssaxuu avatar alyssaxuu commented on March 29, 2024

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.

cenzowm avatar cenzowm commented on March 29, 2024

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.

alyssaxuu avatar alyssaxuu commented on March 29, 2024

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.

cenzowm avatar cenzowm commented on March 29, 2024

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.

alyssaxuu avatar alyssaxuu commented on March 29, 2024

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.

Explosion-Scratch avatar Explosion-Scratch commented on March 29, 2024

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.

cenzowm avatar cenzowm commented on March 29, 2024

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:
Schermata 2022-01-14 alle 22 01 56

from omni.

alyssaxuu avatar alyssaxuu commented on March 29, 2024

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.

nuno-vieira avatar nuno-vieira commented on March 29, 2024

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:
image

But in terms of performance all good 👍 Feel free to close the issue!

from omni.

cenzowm avatar cenzowm commented on March 29, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.