cts icon indicating copy to clipboard operation
cts copied to clipboard

Optimize input data generation

Open austinEng opened this issue 3 years ago • 1 comments

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.

cc @kainino0x

austinEng avatar Aug 16 '22 17:08 austinEng

Worked on this today. WIP patch is in #1787

Drops copyTextureToTexture tests from 71s to 20s on my machine.

toji avatar Aug 24 '22 03:08 toji