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

Steam: Improve installed games scan time by scanning in parallel #417

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

darklinkpower
Copy link
Contributor

Following #416 I Investigated what could be the cause of the very slow scan of installed games.

Since I have a lot of games installed (680~), with the almost all of them installed on a HDD, scanning the games one by one caused this delay. This can be greatly improved by scanning games in parallel.

The benefit will be most noticeable in large libraries.
These are the results:

Current

Execution 1: 846 ms
Execution 2: 749 ms
Execution 3: 690 ms
Execution 4: 708 ms
Execution 5: 652 ms
Execution 6: 657 ms
Execution 7: 720 ms
Execution 8: 677 ms
Execution 9: 685 ms
Execution 10: 695 ms
Execution 11: 738 ms
Execution 12: 734 ms
Execution 13: 754 ms
Execution 14: 699 ms
Execution 15: 642 ms
Execution 16: 678 ms
Execution 17: 695 ms
Execution 18: 647 ms
Execution 19: 646 ms
Execution 20: 671 ms
Execution 21: 692 ms
Execution 22: 724 ms
Execution 23: 680 ms
Execution 24: 719 ms
Execution 25: 725 ms
Execution 26: 656 ms
Execution 27: 684 ms
Execution 28: 689 ms
Execution 29: 667 ms
Execution 30: 697 ms
Average execution time: 697.20 ms

Parallel scan with 2 parallelism

Execution 1: 1763 ms
Execution 2: 342 ms
Execution 3: 334 ms
Execution 4: 332 ms
Execution 5: 337 ms
Execution 6: 337 ms
Execution 7: 334 ms
Execution 8: 334 ms
Execution 9: 337 ms
Execution 10: 364 ms
Execution 11: 348 ms
Execution 12: 347 ms
Execution 13: 425 ms
Execution 14: 393 ms
Execution 15: 378 ms
Execution 16: 346 ms
Execution 17: 344 ms
Execution 18: 338 ms
Execution 19: 356 ms
Execution 20: 364 ms
Execution 21: 346 ms
Execution 22: 352 ms
Execution 23: 353 ms
Execution 24: 351 ms
Execution 25: 347 ms
Execution 26: 348 ms
Execution 27: 360 ms
Execution 28: 367 ms
Execution 29: 358 ms
Execution 30: 341 ms
Average execution time: 399.20 ms

Parallel scan with 3 parallelism

Execution 1: 274 ms
Execution 2: 247 ms
Execution 3: 253 ms
Execution 4: 250 ms
Execution 5: 254 ms
Execution 6: 239 ms
Execution 7: 242 ms
Execution 8: 236 ms
Execution 9: 257 ms
Execution 10: 249 ms
Execution 11: 243 ms
Execution 12: 264 ms
Execution 13: 269 ms
Execution 14: 317 ms
Execution 15: 501 ms
Execution 16: 365 ms
Execution 17: 325 ms
Execution 18: 285 ms
Execution 19: 316 ms
Execution 20: 266 ms
Execution 21: 255 ms
Execution 22: 294 ms
Execution 23: 257 ms
Execution 24: 247 ms
Execution 25: 319 ms
Execution 26: 265 ms
Execution 27: 243 ms
Execution 28: 258 ms
Execution 29: 234 ms
Execution 30: 254 ms
Average execution time: 275.93 ms

The scans are simple and not exhaustive by any means but the benefit is evident. It's possible that SSDs could benefit from greater degrees of parallelism but that has the risk of being counter-productive in HDDs so I left it at 3 that showed great results during these tests.

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.

1 participant