On Dec 18, 2014, at 11:48 AM, Stephan Beal <[email protected]> wrote:

> It should be compressing, at least based on what i see in cgi.c.

You skimmed that a bit too fast.  I was just commenting that I *expected* to 
find that Fossil didn’t gzip its own content, but was surprised to find that it 
does.

gzipped content isn’t yet universal on Apache or nginx-served pages, where you 
can enable it by simply adding a few canned lines to your server’s config file. 
 For it to be in a custom HTTP server for a web app with a rather narrow 
audience, well, that’s fairly impressive.

> i don't know if we have enough CSS to make this worth the effort, though?

The far-future Expires time is more important, since that reduces the ~4 kiB of 
CSS I have here to 0 kiB, after the first page request.

But, minifying with YUI Compressor does get it down to 2.6 kiB, which ain’t 
nothin’.

I wouldn’t expect a hand-rolled one-off CSS minifier to do quite that well, but 
even if it got it to 3 kiB, well, 25% savings always feels nice.

> I found no inline styling; Fossil is delegating all styling to CSS, as far as 
> I can see.
> 
> A few years ago you might have. It's nice to hear we haven't got any left.

I only skimmed a single page, so there might still be some left.  Nevertheless, 
it’s nice not to see a bunch of <font> tags and single-pixel transparent GIFs 
all over the place.

Fossil is still using <table> based layouts, in the timeline view at least.  
Tsk, tsk.  Not that I have the slightest idea how you’d build that page in 
“pure” CSS instead.  Just teasing. :)

> The JS is also in C code. Normally someone develops it in a local JS file or 
> their browser console, then paste it into C and adds quotes around it. It's 
> baked into the binary, so minifying would have to be done on the fly and 
> would have little benefit because we have little JS.

Actually, you could instead keep the JS file separate in Fossil’s own repo, 
then minify it and insert it into the C file as part of the build process.

This would have a side advantage, in that your text editor would syntax-color 
the JS code properly, since it would be in a *.js file now.  You wouldn’t need 
to keep extracting and re-inserting it to achieve that end.

I seem to recall that Fossil already generates some of its own C.  Not true?

Even if you don’t already have a C file assembler in place, it’s pretty trivial 
to implement.  It would be a 20-line shell script based primarily on cat(1) and 
jsmin.
_______________________________________________
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to