From: Stephane Carrez <stephane.carrez@gmail.com>
Subject: Re: ANN: Ada Resource Embedder for C, Ada and Go
Date: Fri, 11 Jun 2021 23:15:30 -0700 (PDT) [thread overview]
Message-ID: <4d308948-f3ba-483f-b46d-55bcb9d3299en@googlegroups.com> (raw)
In-Reply-To: <sa0ev0$nj0$1@gioia.aioe.org>
Le vendredi 11 juin 2021 à 21:53:09 UTC+2, Dmitry A. Kazakov a écrit :
> On 2021-06-11 20:44, Stephane Carrez wrote:
> > Thanks Dimitry for the clarification.
> >
> > Different requirements leads to different solutions.
> >
> > With ARE, I want to embed a Javascript file (such as jQuery), minify it with closure, compress it with gzip
> > and make it available as raw content so that the web server can service it without reading any file.
> > The content being accessible through either an Ada generated variable or through a function,
> > it is mapped in memory (we avoid an open, read, close system call plus the gzip stuff) and
> > the server only has to return the buffer content.
> Same here. In the case of an integrated HTTP server I simply store the
> HTTP pages as a set of string constants and functions generating dynamic
> portions of. The HTTP server uses no external files. Most pages never
> exist in any moment of time, because the server generates portions of
> them and sends away chunks as soon as possible. For this reason I do not
> compress any pages. It would waste too much resources on a small
> embedded system and does not really matter for a large PC.
Not the same. ARE takes a static content and converts it in an Ada source that you compile.
Compression can help even on embedded systems because it reduces the size of data transfer.
A jquery-3.4.1.js file is arround 273K. Minified by closure it is reduced to 89K.
If you also compress it, it reduces to 31K.
On slow networks these size reduction make a difference.
There is no waste of resource because the compression is made during the build process not at runtime.
I would say the opposite: what you get is smaller in size.
Best regards,
Stephane
next prev parent reply other threads:[~2021-06-12 6:15 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-11 13:30 ANN: Ada Resource Embedder for C, Ada and Go Stephane Carrez
2021-06-11 13:51 ` Stéphane Rivière
2021-06-11 15:41 ` Doctor Who
2021-06-12 11:41 ` Doctor Who
2021-06-12 12:03 ` Stéphane Rivière
2021-06-12 12:51 ` Doctor Who
2021-06-11 16:19 ` Dmitry A. Kazakov
2021-06-11 17:32 ` Stephane Carrez
2021-06-11 18:25 ` Dmitry A. Kazakov
2021-06-11 18:44 ` Stephane Carrez
2021-06-11 19:53 ` Dmitry A. Kazakov
2021-06-12 6:15 ` Stephane Carrez [this message]
2021-06-12 11:31 ` Stéphane Rivière
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox