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

Optimization of Code due to high memory intake and slower runtime #15820

Closed
JAGDF opened this issue Jul 18, 2024 · 1 comment
Closed

Optimization of Code due to high memory intake and slower runtime #15820

JAGDF opened this issue Jul 18, 2024 · 1 comment
Labels
codebase quality Issues that are not bugs, but still might be worth improving (eg, code hygiene or maintainability)

Comments

@JAGDF
Copy link

JAGDF commented Jul 18, 2024

Description

When opening Files, it will tend to load slow as well as increasing the CPU usage and memory. Therefore inputs will register seconds after the initial one. The code may have too much code focusing on the visual aspect which restricts some functionality of the application. I cannot make a pull request to make changes to the code as I do not have much knowledge of most of the programming languages involved in the development of this application.

Concerned code

The UpdateTask.cs and WindowsStorageFolder.cs files appear to be a bit cumbersome, but I may be wrong. However, code within the Data and UserControls (could just be named User Controls or Controls) have many files involved.

Gains

  • Better runtime, and low(er) CPU usage; a discrepancy to this imperfect solution is that aesthetics may have a chance to render into downgraded versions of their images
  • Optimization allows application to run on lower-end Windows devices (this includes Windows devices Windows 9 and onwards)
  • Memory usage lowers, system interrupts will not frequent so much as to use up the CPU
  • Allows for fast file searches for content that doesn't involve more than ~200 files (i.e. it will take approximately 1 second to get search results for about 35-40 files)

Requirements

  • Remove some code which has to deal with launching the app and the app's aesthetics. I know this is a big ask, but optimize the code without taking away too much of the quality of the icons. (Does the icons use bitmap or vector?)

Comments

Screenshot 2024-07-18 103740
Memory usage is not extremely high, but runtime is slow and system interrupts increase, leading to CPU usage of a minimum of 40% without additional applications open (for Windows 11, this could be lowered to about 25%)
If code was optimized prior to this issue, this issue is of secondary priority
This issue applies the most to Windows 10 users.

@JAGDF JAGDF added the codebase quality Issues that are not bugs, but still might be worth improving (eg, code hygiene or maintainability) label Jul 18, 2024
@yaira2
Copy link
Member

yaira2 commented Jul 18, 2024

Thank you for your candid feedback. The decision to utilize WinAppSdk and WinUI is what allows us to leverage the latest UI advancements. As you correctly noted, this choice has a performance impact. However, we are continuously optimizing Files, and with ongoing improvements to the mentioned frameworks, performance will enhance over time. Performance is influenced by various factors, so enhancements are gradual, but they accumulate over time. You can learn more about our progress in issue #4180.

@yaira2 yaira2 closed this as completed Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
codebase quality Issues that are not bugs, but still might be worth improving (eg, code hygiene or maintainability)
Projects
None yet
Development

No branches or pull requests

2 participants