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

Caching data spends a lot time on marshaling/unmarshaling data. #35

Open
tok-kkk opened this issue Feb 12, 2020 · 0 comments
Open

Caching data spends a lot time on marshaling/unmarshaling data. #35

tok-kkk opened this issue Feb 12, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@tok-kkk
Copy link
Member

tok-kkk commented Feb 12, 2020

Currently, the cacher of lightnode is using a TTL table of kv. It will marshal/unmarshal when write/read the response. Since the response can be really big, marshal/unmarshal is really expensive in this case.

For a queryBlocks request, the response can be 6- 10MB. A single read/write will take 0.2-0.3 seconds.

The best best solution I can think of is to have a TTL implementation of the bounded map which don't do marshaling/unmarshaling when wirte/read.

@tok-kkk tok-kkk added the enhancement New feature or request label Feb 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants
@tok-kkk and others