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

Optimize frame stats collection #151

Merged
merged 5 commits into from
Jul 31, 2024
Merged

Optimize frame stats collection #151

merged 5 commits into from
Jul 31, 2024

Commits on Jun 22, 2023

  1. Optimize frame stats collection

    Optimize UI performance by calculating frame collection statistics
    dynamically. Rather than repeatedly traversing each frame, we now update
    the stats upon adding or removing frames. This change mitigates the
    significant overhead caused by constantly accessing frame data protected
    by RwLock.
    andreiltd committed Jun 22, 2023
    Configuration menu
    Copy the full SHA
    0a80c56 View commit details
    Browse the repository at this point in the history
  2. Optimize cloning/sorting/deduplication of frames

    This update modifies the data containers used for storing frames to
    adopt binary tree structures. As a result, all frames are sorted at the
    time of insertion, eliminating the need for subsequent sorting during
    vector collection.
    
    Moreover, instead of returning vectors, the binary tree structure
    enables iteration over elements in a sorted order, providing iterators
    rather than vectors. This functionality gives the API caller the
    flexibility to either clone frames or simply inspect them in an
    efficient manner.
    andreiltd committed Jun 22, 2023
    Configuration menu
    Copy the full SHA
    2f8f16f View commit details
    Browse the repository at this point in the history

Commits on Jun 26, 2023

  1. Merge packed and unpacked into single type

    This commit consolidates the packed and unpacked data from frame_data
    into a single enum. The goal of this change is to minimize the number of
    locks required when retrieving information about a frame.
    
    Previously, the process of reading the packing information for stats
    required four separate locks:
     1. One to check 'has_unpacked'
     2. Another to verify 'has_unpacked' within 'unpacked_size'
     3. One to retrieve 'unpacked_size'
     4. And finally, one to retrieve 'packed_size'
    
    With this optimization, the lock count is reduced to a single one,
    achieved through invoking the 'packing_info' function.
    andreiltd committed Jun 26, 2023
    Configuration menu
    Copy the full SHA
    c497844 View commit details
    Browse the repository at this point in the history

Commits on Jun 28, 2024

  1. Configuration menu
    Copy the full SHA
    0831946 View commit details
    Browse the repository at this point in the history

Commits on Jul 8, 2024

  1. Configuration menu
    Copy the full SHA
    c38b8ae View commit details
    Browse the repository at this point in the history