-
-
Notifications
You must be signed in to change notification settings - Fork 201
Inspired by Finicky: wanted to share and say thanks #523
-
Hi John,
I've used Finicky daily for years. Wanted to let you know I built a lighter sketch with the same philosophy, and to thank you for years of frictionless link routing.
The motivation was just wanting something leaner on the hot path and in memory. Finch resolves a URL in ~5μs and sits at ~17MB resident. The design is straight from Finicky: graduated match types (string, regex, or function), the opener context, the rewrite-vs-handlers split. Those are your ideas. I just rebuilt the runtime around them.
https://github.com/expelledboy/finch
Two things might be worth a look if you ever want to copy anything:
-
Marker-object helpers.
domain(),from(),strip()return plain data like{__type: "domain", hosts: [...]}instead of functions. The host walks the config tree at load time and compiles markers to nativeNSRegularExpressionandSetlookups. The hot path stays in Swift, and JS only runs for user-written(url, ctx) => ...predicates. -
Native JavaScriptCore instead of goja. macOS ships JSC, which evaluates ES2020+ directly, so no Babel, no esbuild, no bundler. Fewer moving parts at the cost of portability.
Take whatever's useful. Feel free to share with anyone who'd find it interesting, that's part of why I'm posting here.
Thanks again.
Anthony
Beta Was this translation helpful? Give feedback.
All reactions
-
❤️ 1
Replies: 1 comment 3 replies
-
Congratulations on the release!
- I feel Finicky is fast enough, so I haven't put much effort into improving performance. I also haven't recieved feedback here, so I hope that means it works well for the users.
- Finicky 3 and below actually used JavaScriptCore, but for the rewrite in version 4 I used a more complete setup to support modern syntax that JavaScriptCore doesn't, including Typescript support.
Beta Was this translation helpful? Give feedback.
All reactions
-
The issue is that I open about a link every 3 minutes 😄 Not sure exactly what the issue was, but sometimes finicky would hang for up to a second. Its not a big issue, but enough for me to reduce the features down to just what I needed and max-out performance from a click to the browser opening.
Beta Was this translation helpful? Give feedback.
All reactions
-
I see the same issue - some links have a distinct pause before opening, but I haven't looked into it in depth.
Beta Was this translation helpful? Give feedback.
All reactions
-
Interesting. If you encounter it please let me know (and share the debug log output). Tested a little bit yesterday and I see durations around 80-100 ms per url.
Beta Was this translation helpful? Give feedback.