Repository navigation
things: optimize JXA performance with properties() batching - #24286
Conversation
|
Thank you for your contribution! 🎉 🔔 @loris @andreaselia @jfkisafk @thomaslombart @srikirank @vimtor @samuelkraft @vmrjnvc @dinocosta @janosorcsik 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. 📋 Quick checkout commandsBRANCH="things/jxa-performance-optimization"
FORK_URL="https://github.com/bendrucker/extensions.git"
EXTENSION_NAME="things"
REPO_NAME="extensions"
git clone -n --depth=1 --filter=tree:0 -b $BRANCH $FORK_URL
cd $REPO_NAME
git sparse-checkout set --no-cone "extensions/$EXTENSION_NAME"
git checkout
cd "extensions/$EXTENSION_NAME"
npm install && npm run devDue to our current reduced availability, the initial review may take up to 10-15 business days. |
860441d to
e0204fe
Compare
commented
Jan 8, 2026
|
@greptileai, could you please do a fresh review of this PR? |
properties() batching
commented
Jan 8, 2026
|
Hi @bendrucker, |
fd7e077 to
9c5e1f6
Compare
commented
Jan 8, 2026
|
Done! Applied |
9c5e1f6 to
58b80a9
Compare
Reduces list loading times by ~75% by batching property fetches into single Apple Events instead of individual calls per property. Also removes nested area tags (tags on containing areas) from todo data to further reduce Apple Event overhead.
58b80a9 to
4aaf150
Compare
commented
Jan 12, 2026
|
Published to the Raycast Store: |
commented
Jan 12, 2026
|
🎉 🎉 🎉 We've rewarded your Raycast account with some credits. You will soon be able to exchange them for some swag. |
commented
Jan 13, 2026
|
Hi @pernielsentikaer, |
commented
Jan 14, 2026
You can't "reopen" merged changes, merged is a terminal state, the side effect already happened on the target branch.
Are you talking about the well-documented breaking change or something else? If you are now realizing you really want it the old way, the way forward is another PR to make that change. Though I'd advocate for a preference to control whether area tags are fetched. It's a large performance penalty to fetch related data most users won't populate. That's a bit of conjecture on my part, but I'm coming up on 15 years with Things and I've never once tagged an area. |
commented
Jan 14, 2026
|
Hi @bendrucker, About the breaking change: just because you documented it doesn't mean it's the right call. The tags were there and working. Removing them just because you haven't used them in 15 years isn't a valid reason. By that logic, we could remove any feature that some users don't need. The performance improvement is valuable, but it shouldn't come at the cost of removing functionality. If performance is the concern, a preference toggle makes sense, but the feature should stay by default. I flagged this in my review before the merge. People's workflows are broken now. Can you restore the tags in a follow-up? |
commented
Jan 14, 2026
Where? Look, I can do this, but if you want it urgently, just open the revert PR, it doesn't need to be a discussion. |
|
Re default, it doesn't work this way in Things afaict. My usage is just an example. I proposed the breaking change because i saw a mismatched default behavior with a large perf cost. Edit: Will document Things native behavior more thoroughly, but the more fundamental issue here is loading up every attribute and allowing full text search of a specific list. That's not how Things search behaves, it's more of a Raycast concept. That is why a performance penalty is being paid on load regardless of whether you depend on ancestor tagging for search. Gonna explore a bigger UI change so that the Raycast search bar isn't so overloaded and filtering works more like Things native UI. Edit 2: Yeah, inheritance is quite complicated. It's not just todo -> project -> area, tags have parent relationships too. As pondered above I am going to propose a bigger change, since functional parity with Things with the current extension UI would see a perf cost of more like 50%. |
commented
Jan 29, 2026
|
Are we waiting for a fix here? |
commented
Jan 30, 2026
|
#24489 PR will add the tag filter feature. cc: @pernielsentikaer |
|
Yes! I might have some time this afternoon to finish ⏫ up. |
Description
Optimizes JXA performance in the Things extension by using
properties()batching instead of individual property calls. This reduces Apple Event overhead from ~15+ round-trips per todo to ~3-4, resulting in ~75% faster list loading times.This is particularly impactful on macOS Tahoe, where Apple Event latency appears to have increased significantly. Before this change, loading 28 todos took ~5+ seconds. After, it takes ~1-1.5 seconds.
Changes
api.ts: RewrotegetListTodosto useproperties()batching for todos, projects, and areasapi.ts: Applied same optimization togetProjects,getAreas, andgetTagsProjectsAndAreasmapping templatestagsoptional inAreatype since nested areas no longer include themBenchmark Results
Breaking Change: Nested Area Tags Removed
Tags on containing areas (
todo.area.tags,todo.project.area.tags) are no longer fetched. Todo and project data now only includes:todo.tags— the todo's own tagstodo.project.tags— the project's tagstodo.area.name/todo.project.area.name— area names (still available)Nested area tags required additional Apple Event calls per todo and provided marginal value—users are unlikely to need a tag assigned to a todo's grandparent area. Removing them contributes ~14% additional performance improvement.
Screencast
N/A - performance optimization with no visual changes.
Checklist
npm run buildand tested this distribution build in Raycastassetsfolder are used by the extension itselfREADMEare located outside the metadata folder if they were not generated with our metadata tool