On Wed, May 2, 2018 at 6:45 PM, Ian Lance Taylor <i...@golang.org> wrote: > On Wed, May 2, 2018 at 5:35 AM, Manlio Perillo <manlio.peri...@gmail.com> > wrote: >> Il giorno mercoledì 2 maggio 2018 00:26:05 UTC+2, Ian Lance Taylor ha >> scritto: >> >>> Personally I think the code generation approach is simpler. >>> >> >> It is simpler but, isn't it very inefficient with large assets, since the >> compiler eats a lot of memory? > > That sounds like a fixable problem. If there is an expected way to > embed data, we can make sure that the compiler handles that expected > way efficiently. >
This seems the best solution. Maybe it may help to introduce a custom directive like //go:asset that can hint the compiler to parse and store the data in an efficient way. The only possible problem is that storing large assets as code may increase the executable loading time by the operating system (and consume more virtual memory but I'm not sure). Manlio -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.