Mattermost-server: LRU cache: consider doing serialization/deserialization operations out of critical section

Created on 30 Oct 2020  路  4Comments  路  Source: mattermost/mattermost-server

Our LRU cache get/set calls do the entire operation inside the critical section. But that鈥檚 really not necessary. Only the components of the LRU cache need to be guarded.

The serialization/deserialization operations can move outside the locked sections to possibly ease the lock contention time and increase overall throughput.


If you're interested please comment here and come join our "Contributors" community channel on our daily build server, where you can discuss questions with community members and the Mattermost core team. For technical advice or questions, please join our "Developers" community channel.

New contributors please see our Developer's Guide.

JIRA: https://mattermost.atlassian.net/browse/MM-30140

ArePerformance Medium Hacktoberfest Help Wanted PR Exists TecGo

Most helpful comment

@agnivade I would like to try my hand at this.
I believe changes would be inside /services/cache/lru.go ?
Let me know.

All 4 comments

/cc @Leryan @rvillablanca in case any of you are interested.

If anyone wants more help/clarification, please feel free to comment here and I can clarify further.

@agnivade I would like to try my hand at this.
I believe changes would be inside /services/cache/lru.go ?
Let me know.

Yep, that's correct!

Ok. I will work on this.
Thank you @agnivade @Leryan @rvillablanca

Was this page helpful?
0 / 5 - 0 ratings