0

I want to know which one would result in fastest paint time and in what situations.

After reading confusing opinions i'd like to see some benchmarks..

I have mad mine but don't think it's reliable.

So which one has the fastest performance.

Techsin
  • 514
  • 3
  • 18
  • 1
    What's your end goal? If you're trying to micro-optimize loading a handful of images on a page, you're probably wasting your time, and should just go with the technique that makes the most sense for what you're doing. – Joe Enos Sep 13 '13 at 20:52
  • sort of like gaming...but not full gaming. – Techsin Sep 13 '13 at 20:58
  • http://stackoverflow.com/questions/492809/when-to-use-img-vs-css-background-image?answertab=votes#tab-top – Kevin Lynch Sep 13 '13 at 21:10
  • the answer there tells when its appropriate not much talk about performance. – Techsin Sep 13 '13 at 21:40
  • anyways i made jsperf...not sure if its showing i want it to show. But go ahead edit it and make it show the difference in performance. http://jsperf.com/display-image-performance – Techsin Sep 13 '13 at 21:52
  • edited...now please activate it again – Techsin Sep 14 '13 at 03:49

1 Answers1

4

You can see load times for images within the developer tools in Chrome (Network tab) and within firebug (Net->images tab) add-on for Firefox. Try each out loading the page and see what is fastest.

tnschmidt
  • 1,166
  • 7
  • 17
  • 1
    1+ Apparently the `img` tag is fastest.. http://stackoverflow.com/questions/14998727/which-way-to-load-a-huge-image-canvas-vs-img-vs-background-image – Josh Crozier Sep 13 '13 at 21:04
  • 1
    ive seen that question bf4 posting but not sure if can be relied on. As question also is answering itself in the question meaning asker had some doubts. – Techsin Sep 13 '13 at 21:10
  • 2
    also its not the load time i am interested in, but paint time. For canvas it'd be more, as canvas can be fed only img object not url. So img needs to be loaded invisibly and then linked to canvas. Therefore, i want to the paint time. – Techsin Sep 14 '13 at 03:11