Skip to content

Added caching to bson formats generic reader + some default bson readers#47

Open
pchmiele wants to merge 2 commits into
masterfrom
improving-bson-formats-with-caching
Open

Added caching to bson formats generic reader + some default bson readers#47
pchmiele wants to merge 2 commits into
masterfrom
improving-bson-formats-with-caching

Conversation

@pchmiele
Copy link
Copy Markdown

@pchmiele pchmiele commented May 7, 2020

Added some default bson formats (for optional values - they are used quite often and shapeless is not handling caching them properly)
Added bsonFormat for Seq[T]
Replaced eager evaluation with caching one for generic bson format.

More info about impact on performance here

@mwielocha
Copy link
Copy Markdown
Contributor

Have you tried using shapeless.Cached.implicitly? That could speed things up.

@pchmiele
Copy link
Copy Markdown
Author

pchmiele commented May 7, 2020

I tried couple different combinations of Lazy/Strict/Cached and this one worked best, but will check if it isn't better.

@pchmiele
Copy link
Copy Markdown
Author

I didn't played with it long but I didn't saw benefit of usage of shapeless.Cached.implicitly. I would prefer to stick with the change I suggested if it is ok.

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.

2 participants