Checkout
stefan2
committed
on 24 Apr 16
In FSX, push the usage of the size limiting get-changes-context further
down the callstack.

We now pass it down to the block-read level jus… Show more
In FSX, push the usage of the size limiting get-changes-context further

down the callstack.

We now pass it down to the block-read level just after the data has been

read from disk and will get cached.  For packed (container) data, this

is the end of the line because we must read whole containers.  OTOH, even

in memory, they use only 1/4th of the memory of the API level objects.

Giant change lists might get split across multiple containers at some

point in the future.

Non-packed change lists do still use some transitional code.  The next

changes will then read and cache only limited-size blocks of these instead

whole change lists.

* subversion/libsvn_fs_x/changes.h

 (svn_fs_x__changes_get_list):  Add a CONTEXT to the signature to restrict

                                the result to a sub-range of the list.

* subversion/libsvn_fs_x/changes.c

 (svn_fs_x__changes_get_list):  Restrict the range of changes accordingly.

* subversion/libsvn_fs_x/cached_data.c

 (block_read):  Add a BATON to pass alongside the desired ID.

 (get_node_revision_body,

  create_rep_state_body,

  read_delta_window,

  read_container_window):  Update callers.  These don't use the BATON.

 (svn_fs_x__get_changes):  Pass the CONTEXT further down to the block-read

                           and no longer trim the result locally.

 (block_read_changes):  "Manually" trim the result to exclude the changes

                        already reported according to CONTEXT.

 (block_read_changes_container):  Extract only the changes needed as per

                                  CONTEXT.

 (block_read):  Pass the BATON down to the change list readers. Show less