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

perf: reduce peak memory footprint during decoding large images #375

Merged
merged 1 commit into from
Nov 17, 2023

Conversation

sxyazi
Copy link
Owner

@sxyazi sxyazi commented Nov 17, 2023

Before this patch:

❯ yazi --clear-cache

❯ /usr/bin/time -l ./old
       22.66 real        88.54 user         8.89 sys
          2953068544  maximum resident set size
                   0  average shared memory size
                   0  average unshared data size
                   0  average unshared stack size
              729991  page reclaims
                 544  page faults
                   0  swaps
                   0  block input operations
                   0  block output operations
                  27  messages sent
                  26  messages received
                  27  signals received
               45566  voluntary context switches
              355342  involuntary context switches
        859110694754  instructions retired
        249027752894  cycles elapsed
          2104009664  peak memory footprint

After this patch:

❯ yazi --clear-cache

❯ /usr/bin/time -l ./new
       20.98 real        89.38 user         8.32 sys
          2618294272  maximum resident set size
                   0  average shared memory size
                   0  average unshared data size
                   0  average unshared stack size
              687985  page reclaims
                 578  page faults
                   0  swaps
                   0  block input operations
                   0  block output operations
                  27  messages sent
                  27  messages received
                  27  signals received
               39077  voluntary context switches
              330604  involuntary context switches
        844330267015  instructions retired
        249565769264  cycles elapsed
          1593614592  peak memory footprint

A part of #373

@sxyazi sxyazi merged commit 6a64b16 into main Nov 17, 2023
@sxyazi sxyazi deleted the pr-89c0bfa4 branch November 17, 2023 04:06
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 9, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant