Skip to content

Commit

Permalink
remark on time
Browse files Browse the repository at this point in the history
  • Loading branch information
stefano-ottolenghi committed Jun 10, 2024
1 parent 5a2ab9c commit dcb8d52
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion python-manual/modules/ROOT/pages/performance.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -199,14 +199,15 @@ 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).
<2> It takes about the same time to receive the second batch as the first batch (similar for subsequent batches).
<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.
====

Expand Down

0 comments on commit dcb8d52

Please sign in to comment.