Re: [ClojureScript] Why is each closure library namespace in a separate js file?

2017-01-22 Thread Justin Ratner
Thinking about the numbers a bit more. They might make sense:

413 files in batches of 6 (Chrome allows 6 connections per domain) where the 
average download takes 50ms. 413 / 6 * 50 = ~3400ms

It also makes sense that ~100 files would take less than 1s to load.

I guess we need to think about reducing the number of namespaces in our project.

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at https://groups.google.com/group/clojurescript.


Re: [ClojureScript] Why is each closure library namespace in a separate js file?

2017-01-22 Thread Justin Ratner
We are loading 413 namespaces total. 134 are closure files. 27 are 
clojurescript. 124 are the namespaces of this project. The rest are 
dependencies. These 413 javascript files finish downloading after about 3 
seconds. DOMContentLoaded then fires at 7 seconds. Many of these javascript 
files sit in Chrome's "stalled" state for multiple seconds. The "stalled" state 
is when the browser is waiting for a connection to come available, so it can 
make the request. The actual download (after leaving the stalled state) of any 
given file (except the very large ones) only takes a few milliseconds.

I'm attaching some pictures from the network tab that illustrate what I'm 
talking about.

It may be that chrome's timing is lying, and something isn't right with our 
local dev server. I'll look more into that.


On Sunday, January 22, 2017 at 7:45:23 AM UTC-7, David Nolen wrote:
> Are you sure this isn't a web server configuration issue? We saw long load 
> times with browser REPL due to insufficient concurrency when serving 
> resources. After that was fixed, loading 100+ namespaces into a web browser 
> took less than 1 second during local dev.
> 
> 
> David
> 
> 
> On Fri, Jan 20, 2017 at 2:43 AM, Justin Ratner  wrote:
> We have a fairly large project in which we require a good bit of closure 
> library functionality. While developing with :optimizations :none, hundreds 
> of closure library files are loaded when the page loads. This means that the 
> page takes 7-10 seconds to load. That doesn't seem like much, but when you 
> are refreshing the page many times while developing (I don't always trust 
> code-reload), it adds up.
> 
> 
> 
> Most of the time is spent waiting for browser connections to open up, so the 
> next file can be downloaded. Most browsers can only download a handful of 
> files from one domain at once.
> 
> 
> 
> Wouldn't it be better if the closure library was served in a single js file?
> 
> 
> 
> --
> 
> Note that posts from new members are moderated - please be patient with your 
> first post.
> 
> ---
> 
> You received this message because you are subscribed to the Google Groups 
> "ClojureScript" group.
> 
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to clojurescrip...@googlegroups.com.
> 
> To post to this group, send email to clojur...@googlegroups.com.
> 
> Visit this group at https://groups.google.com/group/clojurescript.

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at https://groups.google.com/group/clojurescript.


Re: [ClojureScript] Why is each closure library namespace in a separate js file?

2017-01-22 Thread David Nolen
Are you sure this isn't a web server configuration issue? We saw long load
times with browser REPL due to insufficient concurrency when serving
resources. After that was fixed, loading 100+ namespaces into a web browser
took less than 1 second during local dev.

David

On Fri, Jan 20, 2017 at 2:43 AM, Justin Ratner 
wrote:

> We have a fairly large project in which we require a good bit of closure
> library functionality. While developing with :optimizations :none, hundreds
> of closure library files are loaded when the page loads. This means that
> the page takes 7-10 seconds to load. That doesn't seem like much, but when
> you are refreshing the page many times while developing (I don't always
> trust code-reload), it adds up.
>
> Most of the time is spent waiting for browser connections to open up, so
> the next file can be downloaded. Most browsers can only download a handful
> of files from one domain at once.
>
> Wouldn't it be better if the closure library was served in a single js
> file?
>
> --
> Note that posts from new members are moderated - please be patient with
> your first post.
> ---
> You received this message because you are subscribed to the Google Groups
> "ClojureScript" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojurescript+unsubscr...@googlegroups.com.
> To post to this group, send email to clojurescript@googlegroups.com.
> Visit this group at https://groups.google.com/group/clojurescript.
>

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at https://groups.google.com/group/clojurescript.


[ClojureScript] Why is each closure library namespace in a separate js file?

2017-01-20 Thread Justin Ratner
We have a fairly large project in which we require a good bit of closure 
library functionality. While developing with :optimizations :none, hundreds of 
closure library files are loaded when the page loads. This means that the page 
takes 7-10 seconds to load. That doesn't seem like much, but when you are 
refreshing the page many times while developing (I don't always trust 
code-reload), it adds up.

Most of the time is spent waiting for browser connections to open up, so the 
next file can be downloaded. Most browsers can only download a handful of files 
from one domain at once.

Wouldn't it be better if the closure library was served in a single js file?

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojurescript+unsubscr...@googlegroups.com.
To post to this group, send email to clojurescript@googlegroups.com.
Visit this group at https://groups.google.com/group/clojurescript.