webtoon / psd

Fast zero-dependency PSD parser for the web and Node.js

Home Page:https://webtoon.github.io/psd

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Benchmark fails occasionally due to imageDecodeTime being negative

pastelmind opened this issue · comments

Benchmark for ag-psd occasionally fails with the following error: imageDecodeTime must be a nonnegative number

This is probably happening because of the rather fragile (and broken) way we currently use to measure the image decode time, i.e. by subtracting the parse time (measured separately) from the total render time:

imageDecodeTime:
parseAndImageRenderEnd - parseAndImageRenderBegin - parseTime,

The benchmark app is long overdue a rewrite anyway; I'm thinking of writing it in React.