Open Eeems opened 9 years ago
I've noticed a couple places where you do:
var variable = input_text.replace(); variable = variable.replace(): variable = variable.replace():
While this works, it's a little less efficient then just chaining the replaces together, like this:
var variable = input_text.replace() .replace() .replace();
public/parse.js#L15
I've also noticed a ton of this:
var variable = "some text"; variable += "some more text"; variable += "some more text";
Which can be replaced with something similar to this:
var variable = "some text"+ "some more text"+ "some more text";
It should be easy enough to read, plus it also will perform a tiny bit faster due to not having to figure out variable references etc. public/main.js#L21 public/main.js#L37 public/main.js#L53 public/parse.js#96
I stole the parser.js code from OmnomIRC as is (well, stole, it's under GPL and it's properly credited), but yeah I should totally clean that code with something more efficient. (Why did I even do that, especially the 2nd point you made o.o)
I've noticed a couple places where you do:
While this works, it's a little less efficient then just chaining the replaces together, like this:
public/parse.js#L15
I've also noticed a ton of this:
Which can be replaced with something similar to this:
It should be easy enough to read, plus it also will perform a tiny bit faster due to not having to figure out variable references etc. public/main.js#L21 public/main.js#L37 public/main.js#L53 public/parse.js#96