Skip to content
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

Performance tweaks #2644

Merged
merged 6 commits into from
Apr 4, 2022
Merged

Performance tweaks #2644

merged 6 commits into from
Apr 4, 2022

Conversation

pjrobertson
Copy link
Member

It helps having a 10 year old Mac ;-) I wouldn't say QS is 'slow', but it could definitely be snappier.

These changes are based on profiling using Instruments. Overall searching should be slightly faster, displaying action should be faster.

I propose this isn't merged into 2.0.0, but saved for a later release. We've got enough to work on right now.

Means it's only made once, saving a tiny bit on memory/performance
…ocalKey

Previously, NSURLVolumeURLKey was being called, then NSURLVolumeIsLocalKey was being called on that value. We can just ask NSURLVolumeIsLocalKey on the file itself.
This was a huge bottleneck, mainly when presenting actions. Previously, actions were being compared to every other object in the catalog using the `[data isEqualToDictionary:anObject->data]` - very wasteful.

Instead, if the classes aren't the same (e.g. QSObject vs. QSAction) then we know straight away that the objects aren't the same
As opposed to deprecated activeApplication
@pjrobertson pjrobertson mentioned this pull request Feb 21, 2022
Improves performance, and fixes #2356
@pjrobertson pjrobertson added this to the 2.1.0 milestone Feb 23, 2022
@ernstki
Copy link

ernstki commented Feb 23, 2022

From one ten-year-old-Mac owner to another, cheers to you, good sir.

@skurfer skurfer merged commit e18ac45 into master Apr 4, 2022
@skurfer skurfer deleted the performanceTweaks branch April 4, 2022 23:40
skurfer added a commit that referenced this pull request Apr 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants