Speaking on speeds,
I've been doing in the last 1.5h multiple speed tests (when I was able to) to
https://area51.phpbb.com/phpBB/viewtopi ... 6&start=10 in a 2G connection both in firefox 38.0.1 and chrome 43.0.2357.81 with only the ABP extension. I used the ABP to block the
/analytics.js
that is in the
<head>
which was ruining my tests. I got some interesting numbers and results.
1st thing I noticed is that Chrome does not show area51 until all CSS registered in the
<head>
and
@include
'd is not finished loading, which, IMO, sucks hard and makes the visual test harder to work on.
Moving on to the interesting results:
All these tests were made in a real 2G connection with ~200Kb/s download and ~20Kb/s of upload and a very stable connection (I don't know how to simulate unstable connections).
These were made with the cache turned off, the times are relative to the initial page request:
It took ~5s to get enough HTML to see the page is loading.
After ~7s, I could already see the top posts (it was showing faster than I could scroll) and some basic styling was already in effect.
After ~10s, the page had most styles in.
After ~11s, the page had all styles in.
Note: The individual style files had been waiting for 7 png images to be loaded (the ones on the top of the page).
After ~10s the js files are queued for download (they are waiting).
After from ~13s to ~14s core.js loads. It takes 1.3s to load 43KB.
After ~15s or ~20s (I couldn't get consistent results here) ajax.js would finish loading.
Note: The individual js files had been waiting for 3-4 .gif images to load.
It took ~30s for the load event to fire and the page to be fully loaded.
I also made some tests with the cache turned on. I didn't take file speeds into account and I noticed that the browser was painting using the cached versions of the CSS even before the updated versions came from the requests. Chrome seemed to be doing the same.
There's 1 thing I love in phpBB, even without js, nearly all looks and feels the same way as if it had js working. For me, that's great.
In my opinion, we can make phpBB apparent loading time quite short just by merging the .css files and without doing any minimization at all. The js files do not bother the loading process (in area51, though, that analytics.js without the
@defer
is troublesome for slow internet speeds) because phpBB looks fully loaded before that and while the user is reacting and locating what he needs, meanwhile, the js loads fully. Regardless of that, concatenating all js is good enough for the current state, even without any resort to minimization.
Now, if files are minimized, it should become better, certainly, but I'm quite certain you won't be able to shave seconds out of the full loading time compared to just merging the files and gzipping them.
CHItA wrote:I guess it would be on deployment, as minified versions are hard to review.
OK. That's what I was expecting and what I agree to have.
CHItA wrote:
What I mean by inclusion code btw, is
which should be easy to find. Also you could possibly add you modifications to a separate file, and add that. I think implementing any minifier support in the core (ACP or wherever) is just unnecessary overhead and work. IMO if you modify something yourself, you take the risks that it won't be that optimized, and I think that is fine.
I think you got something wrong here.
IIRC, phpBB would be served with both minified and non-minified versions of the files. The user wants to modify (not add new(!)) the existing code. If he modifies the original file, he would probably want to have it working right, immediately after. Using that technique, it would mean that whatever code he makes, it would be code to override the original one which may or may not work.
Do you get what I'm saying here?