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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T14:56:36+00:00 2026-06-17T14:56:36+00:00

Does any one know which is going to be better for a browser loading

  • 0

Does any one know which is going to be better for a browser loading time between these two options:

background-image:url('1by1px.png');

or

background-image:url('10by10px.png');

A 1px by 1px semi transparent png repeated for the div. Or a larger one say 10px by 10px.

There must be some kind of looping that has to be done to display the repeated image in the browser, and so I wondered if the image which is 1px by 1px causes alot of looping to get the image displayed that it may in fact be less speedy than a larger dimensioned image with less looping?

Of course the counter argument is image size is smaller for 1by1 compared to 10by10, but doesn’t mean its better to be smaller because looping many times might not scale as good as looping a large image size slightly less often.

Does any know more about which would be better and how browsers handle situations like this?

  • 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-17T14:56:37+00:00Added an answer on June 17, 2026 at 2:56 pm

    When not repeating the background image, the time required to render depends on only the final scaled image, not the original one.

    The image in a file is compressed as PNG format, but after being loaded by browser, it is in RGBA bitmap format (4 bytes for a pixel). When repeating a background, (let say on Intel x86), the native code of browser would use REP MOVSD to move the bitmap data from RAM to video memory (this is standard sequence, might be different on various implementations of graphics driver or specific GPU).

    Assume that the dimensions of the HTML DIV which contains the background would be 100×100.

    For the only-1 pixel image: the browser programme has to exec 10 thousand ‘REP MOVSD’ instructions.

    For the 10×10 image: with each repeated image, the browser programme has to exec ‘REP MOVSD’ only 10 times (1 time calling to ‘REP MOVSD’ can render 1 pixel line (pixel row) of the image). So in this case, the number of ‘REP MOVSD’ instructions executed would be only 10×100 times (10 times in 1 image, 100 repeated images). This takes totally 1 thousand ‘REP MOVSD’.

    Therefore, the final background based on the bigger image would be rendered faster.

    More notes:
    The above explanation doesn’t mean the performance is exactly 10 times better for the 10×10 image. A ‘REP MOVSD’ (with CX=9999 for example) is only 1 single CPU instruction but still requires 9999×4 bytes to be transfered through data bus. If using 9999 simple ‘MOV’s, that much of data still have to go thru’ data bus, however, CPU has to execute 9998 instructions more. A more clever browser would create a pre-rendered bitmap for the background with replicated images; so each time it needs to transfer to video memory, it needs just only 100 ‘REP MOVSD’ (100 is the number of pixel rows in the final background, assumed above) instead of 10 thousand or 1 thousand.

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

Sidebar

Related Questions

Does any one know which of the two choices for random number generation is
Does any one know in which programming language were Google Talk application developed. yes
does any one know of any good countdown timer's for flash which i can
Does anyone know which event is fired after a view is rendered in backbone.js?
Does anyone know in which programming language the Googlebot was written? Or, more generally,
Does anyone know utility which can measure work intensity. For example - keystrokes\mouse clicks
Does anyone know a Library which provides a Thread.sleep() for Java which has an
Does anyone know a script which would wrap old Products namespace style Plone add-on
Does anyone know of a good online resource which gives a clear reference on
Does anyone know of a simple HTML5/CSS3 framework which applies a minimum of formatting

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.