react-use-c icon indicating copy to clipboard operation
react-use-c copied to clipboard

Consider caching binaries

Open memegento-dev opened this issue 2 years ago • 2 comments

Currently the binary is compiled for each request that is not efficient way to use compiled language as C. To bring true performance of C into React component the binaries can be compiled only once and the used directly. This will reduce the overhead of compilation time and filesystem usage.

Inspired by your project we used similar approach for PHP: https://github.com/memegento/react-use-php

As PHP is interpreted language, we pass the source code directly to interpreter.

memegento-dev avatar Oct 29 '23 08:10 memegento-dev

That is a great idea. I can work on this.

For starters, should we go with a simple LRU cache library to cache code and outputs, and When the cache size exceeds the maximum, remove the least recently used item. We can also set ttl with cache I think. Or are we looking for more persistent storage kind of things like redis etc😮?

sanskaromar avatar Oct 29 '23 09:10 sanskaromar

just use sccache or something

elnardu avatar Oct 29 '23 16:10 elnardu