-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Update safari extension #17494
base: main
Are you sure you want to change the base?
Update safari extension #17494
Conversation
- Merge branch \'contributions/merge-1740940927714\' into fix/over-export-size - Pull contributions - Merge branch \'contributions/merge-1740940863811\' into fix/over-export-size - Pull contributions - chore: fixed prettier issues - chore: add prettier ignore file - chore: update ignore list - chore: add go parser to handle bookmarks - fix(safari): optimize performance for enable pinyin - Initial commit
Thank you for your contribution! 🎉 🔔 @loris @thomaspaulmann @SKaplanOfficial @iwex @xilopaint @ridemountainpig @1weiho @xmok you might want to have a look. You can use this guide to learn how to check out the Pull Request locally in order to test it. Due to our current reduced availability, the initial review may take up to 10-15 business days |
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.
PR Summary
This PR adds a Go-based bookmarks parser to the Safari extension to improve performance with large bookmark files.
- Added Go implementation in
/extensions/safari/src/go/
with a more efficient parser that solves "object size is too large" errors - Added new preference option
parseBookmarksWithGo
in package.json to toggle between Node-based and Go-based parsing methods - Implemented benchmark tests in
src/tests/bookmark.bench.ts
to compare performance between the two parsing methods - Replaced third-party
LRUCache
with Raycast's built-inCache
API for better integration - Improved Pinyin support performance by optimizing handler installation and adding performance monitoring
💡 (1/5) You can manually trigger the bot by mentioning @greptileai in a comment!
24 file(s) reviewed, 18 comment(s)
Edit PR Review Bot Settings | Greptile
@pernielsentikaer Hi, for asking help if you have time. I just met a issue that I can't run my go exe file in extension even if I run I have no idea how to solve this issue. |
I just checked the development doc. It seems that I need to move my exe file to the asset folder. I'll try it later. |
Is there a need to use Go, why not Swift (or Objective-C) with a bridge as this is a Safari MacOSX only limit? |
The main reason is that I don't know other high performance language except Go😄. If you are familiar with Swift or OC, feel free to edit this PR. The other reason is that I try to handle data with WASM in the earlier version, and Go has good support for that. |
I have met a performance issue that the Go parser has a wrose performance than node. Especially in the first time running If you have time, please confirm it works well in your Mac. I can only assume that Go parser can provide the bigger size plist file support than node. @ksandvik |
- chore: move go parser to asset folder - chore: remove dist from git
Let's not make it slower 😊 |
Description
Improvements:
parseBookmarksWithGo
option to unlimit the size of bookmarksScreencast
Checklist
npm run build
and tested this distribution build in Raycastassets
folder are used by the extension itselfREADME
are placed outside of themetadata
folder