图像渲染测试
我正在对自定义浏览器进行基准测试,并希望对相同文件大小的不同类型图像(gif、jpg、png)的渲染速度进行基准测试,以了解该浏览器渲染哪种图像格式最快。
我的过程只是为每种类型的图像创建一个简单的单独 HTML 页面,并在渲染之前和之后使用 Javascript 计数器来测量浏览器对该特定图像的渲染速度。
对这个过程有什么想法吗? 关于如何改进它有什么想法吗?
I am benchmarking a custom brower and want to benchmark the rendering speeds of different types of images (gif, jpg, png) of the same file size to see which of the image formats this browser renders the fastest.
My process was just to have a simple seperate HTML page for each type of image and just use a Javascript counter before it is rendered and and after to measure the browser's rendering speed of that specific image.
Any thoughts on this process? Any thoughts on how to improve it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
Firefox Firebug 插件 YSlow 相当不错
The Firefox Firebug plugin YSlow is pretty good
嗯,这样很难得到有意义的通用结果。 您正在测量加载 html、javascript 和图像的组合。 根据您加载它们的位置,您还可以测量磁盘或网络缓存。 图像渲染代码将有一些启动时间,取决于内存分配器和可能的垃圾收集。 然后是图像大小、颜色深度、压缩量、页面上的图像数量、缩放比例、样式表的影响、javascript 计时器的分辨率。 哦,您是渲染到窗口的可见部分、图层中还是屏幕外。
但别担心,您将能够想出一个可用的测试。 针对您的具体情况。 或者差异甚至可能非常明显。
Well, it's difficult to get meaningful generic results that way. You're measuring a combination of loading html, javascript and an image. Depending on where you're loading them from, you're also measuring the disk or network cache. The image rendering code is going to have some startup time, is dependent on a memory allocator and possibly garbage collection. Then there is image size, color depth, amount of compresion, number of images on the page, scaling, the influence of style sheets, the resolution of the javascript timer. Oh, and are you rendering to a visible part of a window, in a layer, or off-screen.
But don't worry, you'll be able to come up with a usable test. For your specific situation. Or the differences might even be very clear.