Open nikpivkin opened 2 weeks ago
@simar7 Generating UUID for a large number of blocks takes an impressive amount of time, as system calls are used. Can we enable pooling, or use a lightweight way to generate id for blocks? The probability of collision is low.
@simar7 Generating UUID for a large number of blocks takes an impressive amount of time, as system calls are used. Can we enable pooling, or use a lightweight way to generate id for blocks? The probability of collision is low.
It makes sense but how much of an improvement is it?
Description
for_each
resource attribute is not added to the context because it cannot be accessed, but it can take up a lot of memory.GetAttr
method to accesscty.Object
attributes, instead of converting the object to a map.Unfortunately there is still the mergeVars function, which cannot be optimised due to some limitations. Because of the impossibility to modify
cty.Object
directly, it is necessary to convertcty.Object
into a map, modify it and create the object from the map again. With a large number of resources, such actions generate a large number of objects and take a decent amount of time due to checks and conversions inside thecty
package.Test config:
Before: Memory usage is increasing, scans are not completed in a reasonable amount of time.
After:
Related issues:
Checklist