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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T12:16:30+00:00 2026-05-25T12:16:30+00:00

In a web app which I’m building, I have two loosely related bits of

  • 0

In a web app which I’m building, I have two loosely related bits of code running in two separate timers every one second.

I’m looking to optimize the Javascript, is it worth merging these two timers into one or is that just over the top?

Realistically, am I going to increase any performance (considering that we don’t know what sort a system a visitor is running ) by merging two 1 second intervals into one 1 second interval?

As I understand it, JavaScript is single threaded so the more things happening, the more these stack up and block other things from happening (timers especially). I just don’t know whether one measly timer running every second is an issue at all.

The reason for keeping the two timers separate would purely be code readability, which is fine on the server side where you control the hardware but I don’t know what sort of browser or hardware my visitors will be running.

Thanks.

  • 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-25T12:16:30+00:00Added an answer on May 25, 2026 at 12:16 pm

    In terms of the overall number of operations that can be completed, no, there isn’t going to be a measurable difference. It is possible for there to be a perceived performance advantage in keeping multiple timers, however. The more code you have running synchronously in a single timer iteration, the longer all DOM updates and certain types of user interactions are “halted”. By splitting these up into multiple timers, you allow other updates to take place in between timer iterations, and therefore the user gets a “smoother” experience.

    Odds are in this case there won’t even be a difference in perceived performance either, though, so I’d do it whichever way makes the code organization simpler.

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

Sidebar

Related Questions

I have a web app which has a single long running task - generating
We are building a web app which will have a lot of images being
I have a web app which users login to it. Every time a specific
Have an ASP.net web app which works fine for a few days, but then
I have a Flash web app which displays user submitted PNG files. Files are
I have a Silverlight web app which uses ASP.net Website administration tool for user
I have a web app which lets the user select the excel spreadsheet and
I have a web app which orders stuff using a timestamp, which is just
I have a web app which serves images based on the subdomain. We wanted
I have a web app which upon startup stores the server local timezone in

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.