JavaScript dependency injection

Note: We are moving the topics of this forum and it will be deleted at some point

Publish your own request for comments/change or patches for the next version of phpBB. Discuss the contributions and proposals of others. Upcoming releases are 3.2/Rhea and 3.3.
User avatar
callumacrae
Former Team Member
Posts: 1046
Joined: Tue Apr 27, 2010 9:37 am
Location: England
Contact:

Re: JavaScript dependency injection

Post by callumacrae »

Sumanai wrote:Any additional logic only slows the page load relatively literate direct insert scripts at the end of <body>
??
Made by developers, for developers!
My blog

User avatar
Sumanai
Registered User
Posts: 95
Joined: Sat Aug 31, 2013 11:12 am

Re: JavaScript dependency injection

Post by Sumanai »

callumacrae, what question? In my opinion it is obvious that the script connects other scripts will generally be run slower than the direct insertion of these scripts. Adding additional logic slow page rendering in the browser.
Sorry for my English.

User avatar
MattF
Extension Customisations
Extension Customisations
Posts: 675
Joined: Mon Mar 08, 2010 9:18 am

Re: JavaScript dependency injection

Post by MattF »

Sumanai wrote:callumacrae, what question? In my opinion it is obvious that the script connects other scripts will generally be run slower than the direct insertion of these scripts. Adding additional logic slow page rendering in the browser.
Not really true. This is about going asynchronous and modular. So only what is needed is loaded, and loaded in parallel. That means, more efficient loading.
Has an irascible disposition.

User avatar
Sumanai
Registered User
Posts: 95
Joined: Sat Aug 31, 2013 11:12 am

Re: JavaScript dependency injection

Post by Sumanai »

VSE wrote:asynchronous
Set tag attribute <script> async very simple and it does not require any additional scripts.
VSE wrote:modular
After splitting the javascript into modules they will be more (obviously), and when you first load the browser will execute multiple queries.
Speed ​​subsequent loads, while taking scripts from the cache will not differ.
Where is the advantage?
Sorry for my English.

User avatar
jsebean
Registered User
Posts: 165
Joined: Wed Nov 17, 2010 1:40 am
Location: Atlantic Canada

Re: JavaScript dependency injection

Post by jsebean »

callumacrae wrote:And that isn't how the browser downloads documents at all—or, for that matter, how anything is downloaded over TCP. If you had a 1 MB/s connection (which is pretty slow), it'll take a lot longer than a second to download a megabyte.
Well I want you to know Callum that I was pretty happy with my blazing fast 1.5Mbps DSL connection... until you said 1MB/s is slow (8Mbps). :lol: In that case, I have snailnet :P
-Jonah

User avatar
callumacrae
Former Team Member
Posts: 1046
Joined: Tue Apr 27, 2010 9:37 am
Location: England
Contact:

Re: JavaScript dependency injection

Post by callumacrae »

Sumanai wrote:
VSE wrote:asynchronous
Set tag attribute <script> async very simple and it does not require any additional scripts.
VSE wrote:modular
After splitting the javascript into modules they will be more (obviously), and when you first load the browser will execute multiple queries.
Speed ​​subsequent loads, while taking scripts from the cache will not differ.
Where is the advantage?
Have you ever actually used a script loader, or are you guessing? I'd suggest you try one out—it might help you better understand what they do.
Made by developers, for developers!
My blog

Post Reply