shazow / go-selfcompile

Build self-recompiling Go binaries
MIT License
39 stars 5 forks source link

Investigate go-bindata NoMemCopy #3

Open shazow opened 9 years ago

shazow commented 9 years ago

Might be able to cut down on some runtime memory usage when restoring the assets.

dmitshur commented 8 years ago

I'd be very curious how vfsgen compares. I've created it with a very tight focus on performance and efficiency, both at generate-time and run-time.

Let me know if you're interested in comparing it yourself. Otherwise, I could try to do it myself, just let me know what ways I can benchmark/compare results.

shazow commented 8 years ago

Interesting. The latest feeling on the situation is that we'll have to ditch go-bindata, otherwise it's impossible to use go-selfcompile with other projects that use go-bindata (it doesn't namespace at all). See #5.

My plan was to roll my own using tar or similar (compression is required in this case, difference between 15-25mb and nearly 100mb).

If you think vfsgen would be a good fit, I'd be happy to give that a try instead next time I sprint on this.

dmitshur commented 8 years ago

I think vfsgen should be a good fit. It supports gzip compression (applied only for files that result in a positive ratio compression), it's one of its core features. I'd recommend you try it.

However, I suspect it would suffer from a similar issue to #5, except it would possibly conflict with vfsgen (rather than go-bindata). Right now, vfsgen can produce one output file per Go package. Given vfsgen is newer and less popular so far, that's a lesser problem, but it's the same class of problem. However, if it's a blocking issue, I am happy to consider working on resolving it so it's not a problem for vfsgen. There was already one other person who might've wanted that feature too.

shazow commented 8 years ago

Fair enough. I think removing conflicts is important (namespacing is nice), but either way the funding on this project is suspended until further notice. Let me know if this is something Sourcegraph wants to use/fund. :)