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 6116127
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T15:10:15+00:00 2026-05-23T15:10:15+00:00

I am working on a ProcessingJS visualization, and I have been noticing that the

  • 0

I am working on a ProcessingJS visualization, and I have been noticing that the performance degrades noticeably when a user selects the canvas element.

Unfortunately, I only have it working locally, so I can’t send a link to the actual page, but here is a 10 second screen cast of the behavior.

When the page loads, and the canvas is not selected, the sketch seems to render at a reasonable pace. If I click the black background of the canvas element, however, the sketch starts drawing noticeably slower. Clicking somewhere else, like outside the browser, or in the url bar to take the focus off of the canvas element improves the performance back to where it was on page load.

so 2 questions:

1) Why is this happening?

2) Is there a way to prevent this? I imagine by preventing the user from focusing the canvas element at all, but open to any suggestions.

I have tried these responses, question1, question2 in regards to disabling user selection of the canvas, but didn’t have any luck.

Thank you!

  • 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-05-23T15:10:15+00:00Added an answer on May 23, 2026 at 3:10 pm

    After wasting some of the ProcessingJS’s team’s valuable time, which you can follow under the linked ticket, they discovered the error was with my HTML file.

    I had been lazy when putting together the HTML file, and left out the header element, so it had looked just like this:

    <script src="processing.js"></script>
    <canvas id="graph_canvas" data-processing-sources="Main.pde ....">
    </canvas>
    

    Which, as the ProcessingJS team pointed out, is not actually a valid HTML file (at all), as it lacks <head><body> etc… elements.

    For whatever reason, having an improperly formatted HTML file was causing the behavior show in the screen shots above. As soon as I added in all the normal required elements, the performance was fine across browsers, with the canvas focused or unfocused.

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

Sidebar

Related Questions

I'm working on a source-code visualization project that uses the Processing core library. The
I've been working with some form processing providers and they seem to have a
I'm working a program that will have a bunch of threads processing data. Each
I have a JavaScript function that is not working now that I put in
I am working on Processing language and have a code like that: int fatness=30;
I have been working on SSE optimization for a video processing algorithm recently. I
I'm working on an application that does processing at what I'd call fairly high
I'm working on an image processing application where I have two threads on top
I'm currently working on a project for medical image processing, that needs a huge
I'm working in image processing project, and I have this problem: If I made

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.