In profiles taken while running the CTS, I found that data generation can take a large majority of the test time - often 70-80% for some tests!
For example, methods like:
GetInitialData in copyTextureToTexture.spec.ts
generate_data in image_copy.spec.ts
These make ArrayBuffer allocations, so we should probably do a similar optimization that @toji did in #1583.
The tests generally just need some arbitrary data, so we can have some allocator function which returns to the test an offset into some previously-allocated and initialized buffer of data.
In profiles taken while running the CTS, I found that data generation can take a large majority of the test time - often 70-80% for some tests! For example, methods like:
GetInitialData
incopyTextureToTexture.spec.ts
generate_data
inimage_copy.spec.ts
These make ArrayBuffer allocations, so we should probably do a similar optimization that @toji did in #1583. The tests generally just need some arbitrary data, so we can have some allocator function which returns to the test an offset into some previously-allocated and initialized buffer of data.
cc @kainino0x