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(node): caching implementation for node operations #830

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Commits on May 1, 2023

  1. perf(node): caching implementation for node operations

    - Add caching for high performance Sets/Gets. The CPU usage and performance of GetNode/SetNode calls are significantly reduced after this change.
    
    - Improve JSON marshalling performance using go-json. This helps squeeze out the last bit of performance particularly for embedded devices.
    
    - Shortcut expensive heap allocations. The repetitive heap allocations may increase GC pressure and increase CPU usage when being called frequently.
    
    For the node cache implementation, the applications that use the `ytypes` library maintain the cache(s) on their own. The applications can optionally pass in a pointer of the `node cache` and get a performance boost. Passing in a pointer of the `node cache` is relatively cheap and has a negligible performance impact. This implementation adds optional fields to the APIs and the node arguments and doesn't introduce breaking changes.
    
    **Note**: unit tests need to be added for `caching enabled` method calls.
    jayzhudev committed May 1, 2023
    Configuration menu
    Copy the full SHA
    aaa2966 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    dea4345 View commit details
    Browse the repository at this point in the history

Commits on May 2, 2023

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

Commits on May 6, 2023

  1. Configuration menu
    Copy the full SHA
    5b6c57c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0deb0ca View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    108cece View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    4051c5d View commit details
    Browse the repository at this point in the history

Commits on May 7, 2023

  1. Configuration menu
    Copy the full SHA
    43b6568 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    286b2e3 View commit details
    Browse the repository at this point in the history

Commits on May 8, 2023

  1. test(ytypes): add node cache tests to set_test

    ... and add initial `node_cache_test`.
    jayzhudev committed May 8, 2023
    Configuration menu
    Copy the full SHA
    df7ba17 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    10a5206 View commit details
    Browse the repository at this point in the history
  3. test(ytypes): add node cache tests to node_test and fix a couple is…

    …sues
    
    - Fixed the node cache not handling the container type `unmarshalGeneric` correctly
    - Added a temp node cache work around for memory address changes of slice heads when
      appending to a slice
    jayzhudev committed May 8, 2023
    Configuration menu
    Copy the full SHA
    d085040 View commit details
    Browse the repository at this point in the history
  4. chore(ytypes): improve node cache error handling

    Check nil for node cache stored `schema` and `parent`. An `Internal`
    error code is returned if either `schema` or `parent` is nil.
    jayzhudev committed May 8, 2023
    Configuration menu
    Copy the full SHA
    e3863e9 View commit details
    Browse the repository at this point in the history

Commits on May 9, 2023

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