Obvs icon indicating copy to clipboard operation
Obvs copied to clipboard

New `Memory` backend, replace ETS?

Open JuneKelly opened this issue 5 years ago • 4 comments

We seem to have a few issues with ETS backends, that are hard to make any better. Maybe a custom map-based storage server as the new default?

JuneKelly avatar Oct 05 '18 12:10 JuneKelly

@ShaneKilkelly Can you share what are the issues with ETS backend?

I've noticed it's guarded by single GenServer process for both reads and writes - maybe allowing concurrent ETS reads from any process could improve the performance and make the ETS backend production-ready?

teamon avatar Feb 25 '20 09:02 teamon

@ShaneKilkelly just coming across this project. We are using ExRated right now on fontawesome.com and we are taking a look at switching to hammer.

And I second what @teamon is saying. I believe the performance issues are because of the synchronous nature of GenServer. ETS by itself is blisteringly fast but by wrapping it with atomic handle_call it slows everything down to essentially a single thread. We did this same thing on fontawesome.com for a bit until we read this article.

@ShaneKilkelly are you interested in a PR that takes the ETS backend and speeds things up for the critical path calls?

robmadole avatar Apr 25 '20 16:04 robmadole

Yup, I'd love to see that kind of PR! Thanks!

JuneKelly avatar May 05 '20 08:05 JuneKelly

@ShaneKilkelly take a look at #41 and see what you think

robmadole avatar May 13 '20 02:05 robmadole

this is merged and solved

epinault avatar Aug 31 '23 22:08 epinault