Vanilla js and it's impact to performance

0 favourites
  • 5 posts
From the Asset Store
It's here!
$4.95 USD
Creepy and nasty horror track. It's terrifying from the beginning till the end. Goosebumps guaranteed
  • i've noticed that jQuery is being used by construct and i've read that its performance it not so huge, it's okay for web sites, but i think it slows down games.

    also i've seen some performance comparisons here:

    http://vanilla-js.com/

    where you can see massive difference in OPS/s between vanilla JS and jquery.

    what i'm mostly concerned about is getting DOM elements - if they're handled every tick for drawing/redrawing/etc., using vanilla would improve performance pretty

    much, don't you think Ashley?

    anyone?

  • I do not pay attention to any discussion of performance unless the discussion includes measurements. I have rarely measured any detectable performance impact from jQuery in our engine, and it is used very little.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • There are some performance measurements on that site (ops/sec)... dunno how much objectivity it is, "Never ask a barber if you need a haircut."

    However I've profiled sometimes the C2 js and jQuery isn't the problem

  • Having been in the run time of C2. jQuery is barely used and isn't used per tick.

    However as a general rule of game design in C2. Don't use DOM on a per tick basis. If you use DOM leave it special Layouts where information processing is the aspect done. Don't use DOM to display text in an action game, don't use DOM.

    Dom

    TextArea

    TextBox

    anything with text that isn't SpriteFont

  • i think there's a lot of jquery vs javascript jsperf examples that show pure javascripts speed over 10-1000 times faster depending on the use case.

    anyway my point was that c2runtime could be optimized even more (i've found a couple examples and i intend to post a list of changes with all data / old vs new testing, code, 10 runs, average etc..)

    i know that mostly problems for people who export are in crosswalk and xdk, but i'm pretty sure there's much to be done here too.

    jayderyu - thnx

    also i didn't check how much jquery does c2 use, but i thought it was a small amount since i didn't find much of it anyway.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)