findings.sort(key=lambdax:sys.getsizeof(x))# This sorts (roughly) by ascending size, so that one big finding doesn't block upload of many small findings.
findings.sort(key=lambdax:get_size(x))# This sorts (roughly) by ascending size, so that one big finding doesn't block upload of many small findings.
test_size=[get_size(x)forxinfindings]# sys.getsizeof(x) doesn't work on nested and custom objects
not_changed_findings=set()
forsingle_findingintqdm(findings,desc="Converting findings to PwnDoc format and upserting"):