Re: com web/php: Re-add a search dropdown to the beta site.: include/footer.inc js/common.js js/ext/hogan-2.0.0.min.js js/ext/jquery-ui-1.8.7.min.js
js/ext/typeahead.min.js js/search.js styles/theme-base.css
| From: | Adam Harvey | Date: | Sat, 07 Dec 2013 22:48:00 +0000 |
| Subject: | Re: com web/php: Re-add a search dropdown to the beta site.: include/footer.inc js/common.js js/ext/hogan-2.0.0.min.js js/ext/jquery-ui-1.8.7.min.js js/ext/typeahead.min.js js/search.js styles/theme-base.css |
||
| References: | 1 2 | Groups: | php.webmaster |
| Request: | Send a blank email to php-webmaster+get-17433@lists.php.net to get a copy of this message | ||
On 6 December 2013 13:43, Levi Morrison <levim@php.net> wrote:
> I am concerned about the number of JS files this adds. I know it's only
> adding 2 but I am working on our rendering time. Since you are familiar with
> this bit of code, Adam, would you consider reducing the JS code needed or at
> least merging the files? I had our website rendering with fewer than 18
> requests but we're already up to 25 and it's getting slow again.
The only non-external dependency it adds is search.js. I'd be strongly
against combining external dependencies — it creates a nightmare when
we want to upgrade them.
I'm not really terribly excited by the prospect of generally reducing
or merging JS files in Git, honestly. These files do useful things,
and keeping them separate makes structural sense to me. I'd rather
incur a few more round trips — for files that should be cached on
anything other than a cold start anyway, so we're really not dealing
with the common case — than make code maintenance harder.
I would be quite a bit keener on the idea of combining the JS files
before they get served to users, as you floated in another thread. I
think we can have our cake and eat it to by combining and minifying
before the files hit the rsync servers, and that's something we should
investigate. (It also helps down the track if we decide to use LESS or
another CSS preprocessor, which I've previously talked about wanting
to do.)
Adam