Efforts to speed up application; initially ran around ~50ms on initial data loops, now runs in the ~30ms range. Doing division in JS over large loops == insane, I'm guessing because everything is floating point. Multiply by 0.5 instead and we get some nice speedups (odd, I know; best answer I can muster...).
This commit is contained in:
parent
70dfb93447
commit
4fe6ed90ca
2 changed files with 38 additions and 43 deletions
14
index.php
14
index.php
|
|
@ -41,7 +41,7 @@
|
|||
});
|
||||
|
||||
$("#try_these a").click(function() {
|
||||
img_input.value = this.innerHTML;
|
||||
img_input.value = "awesome/" + $(this)[0].innerHTML;
|
||||
return false;
|
||||
});
|
||||
|
||||
|
|
@ -95,15 +95,15 @@
|
|||
<input type="submit" class="img_submit" value="Upload and be awesome">
|
||||
</form>
|
||||
<form method="post" action="#" id="franz_form">
|
||||
<input type="text" id="img_input" value="lol.png">
|
||||
<input type="text" id="img_input" value="awesome/lol.png">
|
||||
<input type="submit" class="img_submit" value="Go for it!">
|
||||
</form>
|
||||
<p id="try_these"><strong>Try out:</strong>
|
||||
<a href="#" title="lol.png">lol.png</a>,
|
||||
<a href="#" title="testjubs.jpg">testjubs.jpg</a>,
|
||||
<a href="#" title="stars.jpg">stars.jpg</a>,
|
||||
<a href="#" title="1600.jpg">1600.jpg</a>,
|
||||
<a href="#" title="fallout.jpg">fallout.jpg</a>
|
||||
<a href="#" title="awesome/lol.png">lol.png</a>,
|
||||
<a href="#" title="awesome/testjubs.jpg">testjubs.jpg</a>,
|
||||
<a href="#" title="awesome/stars.jpg">stars.jpg</a>,
|
||||
<a href="#" title="awesome/1600.jpg">1600.jpg</a>,
|
||||
<a href="#" title="awesome/fallout.jpg">fallout.jpg</a>
|
||||
</p>
|
||||
|
||||
</div>
|
||||
|
|
|
|||
Reference in a new issue