Replace paginated with iterator
In reference to the issue #1798
- Replaced the custom paginated by using the inbuilt
.iterator()method - Also removed the
paginatedmethod from theBaseQuerySet
@keshav-space Looking forward to your insights
@kunalsz Thanks! Did you make any quick measurement before and after to validate that this is more efficient in ram/cpu/number of queries? Would there be a small unit test that could check this?
Hi @pombredanne , I don't know how to test this out like @keshav-space did in the respective issue, if he could share the code/test file which he used to compare both the functions then I'll happily add the test results too.
Hi @pombredanne , I don't know how to test this out like @keshav-space did in the respective issue, if he could share the code/test file which he used to compare both the functions then I'll happily add the test results too.
@kunalsz a very simple way to evaluate the performance would be to start VulnerableCode in Docker and run a large pipeline, like the GitHub importer pipeline, and collect the logs. Do this process twice, once with the old paginated and then with the built-in iterator and compare the logs. Make sure to reset the database between the two runs.