Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8444987
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T09:32:30+00:00 2026-06-10T09:32:30+00:00

I have coded a little engine to display 5 sprites using javascript in Canvas2D.

  • 0

I have coded a little engine to display 5 sprites using javascript in Canvas2D. Everything works fine and is completely optimised.

The FPS fluctuates between 30 and 60 – but the interesting thing is, it says on a constant 60 fps when the google javascript console is open!

Any body else experiencing this?

n.b. I am using requestAnimationFrame

Edit:

Example:
http://jsfiddle.net/jrPNy/1

Play Around with the “Particles” Number so your fps is around 40-50. Than open the console, and it goes up to 60 fps. (Chrome 21.0.1180.83)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T09:32:32+00:00Added an answer on June 10, 2026 at 9:32 am

    As the question author remarked in a comment, this has to do with the visible canvas area. Opening the console reduces the height of the viewport, which on a normal-sized display means that there will be less content to render. 60 FPS is a soft limit given by the display refresh rate; doing more frames than that wouldn’t make sense since it’s impossible to display more than 60 frames per second on a normal monitor.

    I tested this on my machine, reducing the CPU speed so that I don’t always get 60FPS. In the provided Fiddle example, I had around 24FPS normally. Opening the Console reduced the visible canvas to about 60% of its original size, and the FPS increased to 30 on average. Resizing the Console would influence the FPS accordingly: with only 10% of the canvas visible, the FPS wiggled around 42, and with a very small Console and the entire canvas visible, the FPS went slightly below the original value, to 23. Increasing the CPU speed brought the FPS to a constant 60, regardless of the state of the Console.

    Now, given that the JavaScript that generates the screen is still running, regardless of how much of the canvas is visible, what influences the needed processing power is the actual rendering of the canvas, and the way the canvas image is composited onto the rest of the HTML, on the browser window, and finally onto the screen. More and more of that work is moved to the GPU, so when every stage of the compositing process will be done in OpenGL, the FPS should always be maxed out.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to turn on a little engine with the iphone I mean, using
I have a little console application that has an embedded v8 engine, and I
I have a little application which is working fine when testing is on localhost.
I'm making a 3D game in XNA using Ox Engine. There is very little
I have built little custom web framework on top of Python 3.2 using Cherrypy
Okay I have updated my code a little, but I am still not exactly
I have a simple little code fragment that is frustrating me: HashSet<long> groupUIDs =
its a little bit hard to understand. in the header.php i have this code:
I have the following code setup: http://jsfiddle.net/bABHU/2/ Had to change it a little bit
UPDATE: To help clarify what I'm asking I have posted a little java code

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.