From dcb8d520466b732e9febaccc959df7e5afe039fd Mon Sep 17 00:00:00 2001 From: Stefano Ottolenghi Date: Mon, 10 Jun 2024 12:58:37 +0200 Subject: [PATCH] remark on time --- python-manual/modules/ROOT/pages/performance.adoc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python-manual/modules/ROOT/pages/performance.adoc b/python-manual/modules/ROOT/pages/performance.adoc index de515cf0..f6284143 100644 --- a/python-manual/modules/ROOT/pages/performance.adoc +++ b/python-manual/modules/ROOT/pages/performance.adoc @@ -199,7 +199,7 @@ if __name__ == '__main__': [1718014544.02] Processing record 248 [1718014544.52] Processing record 249 [1718014545.02] Peak memory usage: 80222 bytes // <5> -[1718014545.02] --- 149.10213112831116 seconds --- +[1718014545.02] --- 149.10213112831116 seconds --- // <6> ---- <1> With lazy loading, the first record is available ~10 seconds after the query is submitted (i.e. as soon as the server has retrieved the first batch of 100 records). @@ -207,6 +207,7 @@ if __name__ == '__main__': <3> With eager loading, the first record is available ~25 seconds after the query is submitted (i.e. after the server has retrieved all 250 records). <4> There's no delay in between batches: the processing time between any two records is the same. <5> Memory usage is larger with eager loading than with lazy loading, because the application materializes a list of 250 records (while in lazy loading it's never more than 100). +<6> The total running time is practically the same, but lazy loading spreads that out across batches whereas eager loading has one longer waiting period. ====