2
votes
2answers
155 views

Should I group all of my .js files into one large bundle?

One of the difficulties I'm running into with my current project is that the previous developer spaghetti'd the javascript code in lots of different files. We have modal dialogs that are reused in ...
1
vote
2answers
203 views

Polling vs events pros and cons in JavaScript

I'm bit of a novice to JavaScript so I've been wondering on positive and negative sides of using polling compared to using events in JavaScript? When does one use one or the other? By polling I ...
1
vote
0answers
203 views

How many Angular Controllers and/or Directives is too many?

I'm building a large, editable data table with angular, and I'm trying to figure out what the best practice is. The table will be a couple of hundred rows, with a couple of dozen columns, so upwards ...
-3
votes
2answers
1k views

Why is Javascript faster than Jquery? [closed]

I was reading a thread and saw this post, which says that Javascript is faster than Jquery because it uses native code. But why is the use of native code faster? Is this always the case? What ...
2
votes
1answer
1k views

best way to store data from ajax call

I am writing a web-application in which I am retrieving data's from server through AJAX requests and the generate HTML content dynamically. I have some data to load, generate HTML from it and append ...
1
vote
3answers
430 views

Add javascript to all pages (for caching), or only to the pages that require the scripts (for a smaller page size)?

I'm using bits of javascript on my website for an image gallery, smooth scrolling, etc. These scripts are not used on every page (not every page has an image gallery for example). However, the scripts ...
2
votes
3answers
242 views

Will object reuse optimize this often-called function?

Suppose I have a function that I need to call a lot, maybe a few thousand times on every mouse down or mouse move. It uses an instance of a function (class), called Transform: function func1(a, b, c) ...
4
votes
4answers
2k views

Server-side vs Client-side web application Performance [closed]

I am an entry level programmer with only a few months of experience. Yesterday I was discussing with a colleague how we can improve the performance of a project we are working on together. The ...
2
votes
3answers
1k views

Anonymous function performance - setTimeout

According to Gregory Baker & Erik Arvidsson (Google), creating a named function and then passing that to setTimeout is actually faster than creating an anonymous function (reference: Optimizing ...
7
votes
2answers
518 views

Does javascript support numerically indexed arrays with a more optimized algorithm than an associative array?

I know that Python, Perl, Java, Lua and obviously C (as it's the only array that's in ANSI standard afaik) support faster looking of numerically indexed arrays than doing a hash lookup or anything ...
3
votes
1answer
1k views

Cost of setInterval in Javascript

I've got some code that I want to run when certain HTML elements are added to the page. To do this, I have a "runOnRender" function: runOnRender: function (func, args, interval) { var ...
2
votes
1answer
215 views

What is the most performant CSS property for transitioning an element?

I'm wondering whether there is a performance difference between using different CSS properties to translate an element. Some properties fit different situations differently. You can translate an ...
3
votes
2answers
411 views

Is script grouping and minification counter-productive?

On a web page I have 1 script tag that contains all my minified JavaScript (I use SquishIt for .NET). However I see that a few people prefer to load their scripts in parallel using something like ...
6
votes
1answer
2k views

Performing client-side OAuth authorized Twitter API calls versus server side, how much of a difference is there in terms of performance?

I'm working on a Twitter application in Ruby on Rails. One of the biggest arguments that I have with other people on the project is the method of calling the Twitter API. Before, everything was done ...
3
votes
1answer
351 views

Specifically for JS, CSS, HTML: what is the difference between optimization, compression, minification, tidying, concatenation?

When we talk about source code and the file which contains the code like CSS, HTML, JavaScript and we also talk about performance of a web site or application, what is the differences between these ...
2
votes
3answers
1k views

Measures of Javascript engine performances over time?

Since the beginning of the Javascript race -- which I would situate around Google Chrome launch in 2008 -- the improvement in the Javascript engine performances have been impressive. The web is ...
18
votes
8answers
8k views

Why Should I Avoid Inline Scripting?

A knowledgeable friend recently looked at a website I helped launch, and commented something like "very cool site, shame about the inline scripting in the source code". I'm definitely in a position ...
2
votes
1answer
158 views

Alternative methods for maintaining JavaScript source

I'm looking for other options for maintaining my personal JavaScript namespace. The problem I'm having boils down code Organization Vs. Performance. I would simply LOVE to be able to separate major ...