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

Improve perf with some concurrency magic #347

Merged
merged 5 commits into from
Mar 29, 2024

Conversation

jonko0493
Copy link
Member

@jonko0493 jonko0493 commented Mar 6, 2024

Closes #310 in both letter and spirit.

Introduces two new ArchiveFile methods from a lib change:

  • GetFileByIndex – gets a file with direct indexing which is a huge perf bump from before
  • GetFileByName – gets a file with by name with a PLINQ query which is faster than just doing it regularly

I made sure to replace the old file lookups we had with these two. Things should load quicker in general now.

In addition, in an effort to improve project load times, I removed the ScriptUses property from all items that have it and stopped calculating script usages at load/save time. Instead, we now calculate them as part of reference lookup. It turns out that this is preferable as load times are now blazing fast and you can't really tell that reference lookups have slowed down at all except for the orphaned files dialog which still isn't that slow (and is a lower priority than opening a project anyway).

@jonko0493 jonko0493 self-assigned this Mar 6, 2024
@jonko0493
Copy link
Member Author

jonko0493 commented Mar 6, 2024

Test failures are legit; will need time to investigate them.

Copy link
Member

@WiIIiam278 WiIIiam278 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh yeah this is definitely a lot faster :) nice stuff!

@jonko0493 jonko0493 merged commit a9c4551 into haroohie-club:main Mar 29, 2024
4 checks passed
@jonko0493 jonko0493 deleted the Parallelization branch March 29, 2024 22:50
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.

Replace .First(idx => Index == idx) lookups with direct indexing
2 participants