I am actually not happy with the amount of files whats loading in. I have a simple web app, with a few buttons and a timer, but it generates 352 requests to the server for a total of 2.9 MB in 10,83 sec. (and i have not some cheap webhost)
Is it possible to load just the files it needs? Because i see its loading, for example, RadioButton.css, Calendar.css, and almost-every-gadget.js but iam not even using that in my app.
Is it possible to exclude that in the export?
I know theres a library map with all in it, but it would be better to only export the stuff it needs for that particurlarly web app. Or maybe better, keep the lib map, but only request the files its needs for the web app.
Whatever the outcome, the number files loaded needs to cut down alot.
3MB traffic for one request?
Re: 3MB traffic for one request?
I also noticed that on the french forum, and it really got me crazy.
Re: 3MB traffic for one request?
It should be only an issue for the first launch, after all should be cached client-side. I know it's a lot of files, but that's the way DOJO works (tons of small files) which can get requested in parallel to accelerate the launch (!). That's the AMD stuff handled via RequireJS http://requirejs.org/
Re: 3MB traffic for one request?
Just to get this straight:
So, if i make another GUI app, it will use the previous cached files in the browser?
Just for comparison: I made a app in javascript (Jquery) itself, and it uses only 1.46GB of traffic for the whole month, with 100k+ visits and 1 million+ hits.
Some math, if using SB: i have 35000 unique visitors (and still growing) on my site per month, it means that i can have 35000*3=105000 = 105GB of traffic??? just for a simple javascript GUI?
Thats alot of load not necessary for a site, i would think?
So, if i make another GUI app, it will use the previous cached files in the browser?
Just for comparison: I made a app in javascript (Jquery) itself, and it uses only 1.46GB of traffic for the whole month, with 100k+ visits and 1 million+ hits.
Some math, if using SB: i have 35000 unique visitors (and still growing) on my site per month, it means that i can have 35000*3=105000 = 105GB of traffic??? just for a simple javascript GUI?
Thats alot of load not necessary for a site, i would think?
Re: 3MB traffic for one request?
Hello,
Your arguments are not reliable. Put a 3mb photo on your page and your traffic will but the same... only for one simple photo? yeah..
And you can't compare just Jquery against the tons of librairies used by SB.
You can't get over the first download of libraries (maybe we could compress them?). The real problem is the SB code translated in JS is in the same file as the SB libraries wich need a cache refresh if you make any change in your APP.
What i personnaly do to get over this, i server my html and js / css from a little web server written in python with Flask and simply put a token (based on timestamp) on spiderbasic.js (like: <script src="/static/js/spiderbasic.js?token=AEF486DFH87RV" />).
With that i just have to do a simple refresh on the browser (not the re-cache one) to have the new version of my app.
But yes, it would be nice if the code of our app is separated from other "static" JS. Also an option the regenerate the js (like what compile & run do) without opening the browser would be nice beacause it open n tabs in chrome for n compilation (i made a fake browser wich just copy de js file from %temp% to my server to get over that)
Your arguments are not reliable. Put a 3mb photo on your page and your traffic will but the same... only for one simple photo? yeah..
And you can't compare just Jquery against the tons of librairies used by SB.
You can't get over the first download of libraries (maybe we could compress them?). The real problem is the SB code translated in JS is in the same file as the SB libraries wich need a cache refresh if you make any change in your APP.
What i personnaly do to get over this, i server my html and js / css from a little web server written in python with Flask and simply put a token (based on timestamp) on spiderbasic.js (like: <script src="/static/js/spiderbasic.js?token=AEF486DFH87RV" />).
With that i just have to do a simple refresh on the browser (not the re-cache one) to have the new version of my app.
But yes, it would be nice if the code of our app is separated from other "static" JS. Also an option the regenerate the js (like what compile & run do) without opening the browser would be nice beacause it open n tabs in chrome for n compilation (i made a fake browser wich just copy de js file from %temp% to my server to get over that)
Re: 3MB traffic for one request?
really? Why is that?cederavic wrote: Your arguments are not reliable.
Iam not talking about pictures.
Iam talking about the big difference in export in MB between Jquery UI and SpiderBasic UI.
Iam not paying for more server load because i need to serve 3MB on files for an easy web app. While the same web app can be done in a few kb's in javascript jquery...
Re: 3MB traffic for one request?
Sorry if my answer seems aggressive, i did not mean to... I'm french and i don't always use the right words
I know you are not talking about images, it was just to say SB use Dojo (wich is heavy yes) and your browser need to download it as to view a 3MB image your browser need to download its data. I don't think SB can run without Dojo, only fred can confirm that.
And you can't compare Jquery UI and Dojo. Jquery UI is very light in functionnalities compared to Dojo / Dijit, it's like comparing Unity with OpenGL.
I know you are not talking about images, it was just to say SB use Dojo (wich is heavy yes) and your browser need to download it as to view a 3MB image your browser need to download its data. I don't think SB can run without Dojo, only fred can confirm that.
And you can't compare Jquery UI and Dojo. Jquery UI is very light in functionnalities compared to Dojo / Dijit, it's like comparing Unity with OpenGL.
Re: 3MB traffic for one request?
I understand.
But if the web app is only using a few buttons, it loads alot of files what is not being used in the main app.
Its like loading 100 more pictures, that the user wont see anyway, just because its in the same album.
But if the web app is only using a few buttons, it loads alot of files what is not being used in the main app.
Its like loading 100 more pictures, that the user wont see anyway, just because its in the same album.
Re: 3MB traffic for one request?
Yes i agree on that. I don't know Dojo enough, maybe it's modular enough to load only what is actualy used in our code but i don't think so...
Maybe a CDN would be a great alternative too? If someone can provide it... With the trick of the token param, your program would take only maybe 100kb to download.
As you can see, loading the page with cached libraries (only script and css are reloaded) it took only 129kb :
Maybe a CDN would be a great alternative too? If someone can provide it... With the trick of the token param, your program would take only maybe 100kb to download.
As you can see, loading the page with cached libraries (only script and css are reloaded) it took only 129kb :
Re: 3MB traffic for one request?
Token param?
I just tested, my browser is not caching anything.
I just tested, my browser is not caching anything.