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

Nested map tree #15

Merged
merged 303 commits into from
Nov 7, 2023
Merged

Nested map tree #15

merged 303 commits into from
Nov 7, 2023

Conversation

Dabnsky
Copy link
Contributor

@Dabnsky Dabnsky commented Oct 10, 2023

This will replace the flat map structure with a tree. This should improve performance involved looking up cached items regarding files and folders.

Summary changes:
-modified cacheMap.go to define the tree structure and functions to insert, get, and doing a mark delete and invalidate on directories.
-added cacheMap_test.go that tests the cacheMap tree structure functions
-modified attr_cache.go to reference the new tree structure instead of the flatmap
-modified attr_cache_test.go to appropriately reference the tree structure as well as made corrections to functions in attr_cache.go to make sure the tests all pass.

This is my implementation of the insert and delete and get functions for the cacheMap tree and the respective tests to go with them.
Dabnsky and others added 18 commits November 1, 2023 14:43
Co-authored-by: Michael Habinsky <[email protected]>
Signed-off-by: David Habinsky <[email protected]>
Co-authored-by: Michael Habinsky <[email protected]>
Signed-off-by: David Habinsky <[email protected]>
…tr_cache/attr_cache.go : anycontentsInCache()

Co-authored-by: Michael Habinsky <[email protected]>
Signed-off-by: David Habinsky <[email protected]>
Co-authored-by: Michael Habinsky <[email protected]>
Signed-off-by: David Habinsky <[email protected]>
Co-authored-by: Michael Habinsky <[email protected]>
Signed-off-by: David Habinsky <[email protected]>
Co-authored-by: Michael Habinsky <[email protected]>
Signed-off-by: David Habinsky <[email protected]>
…o body of if in FlushFile()

Co-authored-by: Michael Habinsky <[email protected]>
Signed-off-by: David Habinsky <[email protected]>
Co-authored-by: Michael Habinsky <[email protected]>
Signed-off-by: David Habinsky <[email protected]>
Co-authored-by: Michael Habinsky <[email protected]>
Signed-off-by: David Habinsky <[email protected]>
Co-authored-by: Michael Habinsky <[email protected]>
Signed-off-by: David Habinsky <[email protected]>
Co-authored-by: Michael Habinsky <[email protected]>
Signed-off-by: David Habinsky <[email protected]>
Co-authored-by: Michael Habinsky <[email protected]>
Signed-off-by: David Habinsky <[email protected]>
…enameFile() return nil for error check on item not in cache.
Copy link
Contributor

@foodprocessor foodprocessor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just empty lines now!

component/attr_cache/attr_cache_test.go Outdated Show resolved Hide resolved
component/attr_cache/attr_cache_test.go Outdated Show resolved Hide resolved
component/attr_cache/attr_cache_test.go Outdated Show resolved Hide resolved
component/attr_cache/attr_cache_test.go Outdated Show resolved Hide resolved
component/attr_cache/attr_cache_test.go Outdated Show resolved Hide resolved
component/attr_cache/attr_cache_test.go Outdated Show resolved Hide resolved
component/attr_cache/attr_cache_test.go Outdated Show resolved Hide resolved
component/attr_cache/attr_cache_test.go Outdated Show resolved Hide resolved
component/attr_cache/attr_cache_test.go Outdated Show resolved Hide resolved
component/attr_cache/attr_cache_test.go Outdated Show resolved Hide resolved
Dabnsky and others added 4 commits November 3, 2023 14:07
Co-authored-by: Michael Habinsky <[email protected]>
Signed-off-by: David Habinsky <[email protected]>
Co-authored-by: Michael Habinsky <[email protected]>
Signed-off-by: David Habinsky <[email protected]>
Co-authored-by: Michael Habinsky <[email protected]>
Signed-off-by: David Habinsky <[email protected]>
Co-authored-by: Michael Habinsky <[email protected]>
Signed-off-by: David Habinsky <[email protected]>
component/attr_cache/cacheMap.go Outdated Show resolved Hide resolved
@Dabnsky Dabnsky merged commit bba7563 into main Nov 7, 2023
8 of 11 checks passed
@Dabnsky Dabnsky deleted the nested_map_tree branch November 7, 2023 21:10
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.

3 participants