图像渲染测试 [英] Image Rendering Test

查看:131
本文介绍了图像渲染测试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在对自定义浏览器进行基准测试,并希望对相同文件大小的不同类型图像(gif,jpg,png)的渲染速度进行基准测试,以查看此浏览器呈现哪种图像格式最快。

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.

我的过程只是为每种类型的图像创建一个简单的单独HTML页面,只需在渲染之前使用Javascript计数器,然后测量浏览器对该特定图像的渲染速度。

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?

推荐答案

嗯,这样很难得到有意义的通用结果。你正在测量加载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.

这篇关于图像渲染测试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆