cts
cts copied to clipboard
Optimize input data generation
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:
GetInitialDataincopyTextureToTexture.spec.tsgenerate_datainimage_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
Worked on this today. WIP patch is in #1787
Drops copyTextureToTexture tests from 71s to 20s on my machine.