/[Apache-SVN]
ViewVC logotype

Revision 1905528


Jump to revision: Previous Next
Author: kotkov
Date: Fri Nov 25 17:13:55 2022 UTC (19 months ago)
Changed paths: 9
Log Message:
On the 'pristines-on-demand-on-mwf' branch: Rework the RA part of the
text-base fetching.

This changeset solves a performance issue where fetching a single text-base
over ra_serf required two requests (PROPFIND + GET) instead of one (GET).

It also lays the groundwork for reusing RA sessions.  Such reuse was partly
blocked by having to open a session that is not associated with a specific
working copy, because otherwise a content fetch would first try the local
pristine cache — which is a waste of resources for the case when we are
fetching the pristines ourselves.

* subversion/include/svn_ra.h
  (svn_ra_fetch_file_contents): New.

* subversion/libsvn_ra/ra_loader.h
  (svn_ra__vtable_t.fetch_file_contents): New

* subversion/libsvn_ra/ra_loader.c
  (svn_ra_fetch_file_contents): Call the new vtable member.

* subversion/libsvn_ra_local/ra_plugin.c
  (get_file): Factor out this helper function.  Always close the stream.
  (svn_ra_local__get_file): Call the helper function, disowning the stream
   to keep the current behavior.
  (svn_ra_local__fetch_file_contents): New, implemented with a call to the
   new helper function.
  (ra_local_vtable): Add new function to vtable.

* subversion/libsvn_ra_svn/client.c
  (get_file): Factor out this helper function.  Always close the stream.
  (ra_svn_get_file): Call the helper function, disowning the stream
   to keep the current behavior.
  (ra_svn_fetch_file_contents): New, implemented with a call to the
   new helper function.
  (ra_svn_vtable): Add new function to vtable.

* subversion/libsvn_ra_serf/ra_serf.h
  (svn_ra_serf__fetch_file_contents): New.

* subversion/libsvn_ra_serf/get_file.c
  (svn_ra_serf__fetch_file_contents): New.

* subversion/libsvn_ra_serf/serf.c
  (serf_vtable): Add new function to vtable.

* subversion/libsvn_client/textbase.c
  (textbase_hydrate_cb): Use the new RA function to fetch the contents.


Changed paths

Path Details
Directorysubversion/branches/pristines-on-demand-on-mwf/subversion/include/svn_ra.h modified , text changed
Directorysubversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_client/textbase.c modified , text changed
Directorysubversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_ra/ra_loader.c modified , text changed
Directorysubversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_ra/ra_loader.h modified , text changed
Directorysubversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_ra_local/ra_plugin.c modified , text changed
Directorysubversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_ra_serf/get_file.c modified , text changed
Directorysubversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_ra_serf/ra_serf.h modified , text changed
Directorysubversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_ra_serf/serf.c modified , text changed
Directorysubversion/branches/pristines-on-demand-on-mwf/subversion/libsvn_ra_svn/client.c modified , text changed

infrastructure at apache.org
ViewVC Help
Powered by ViewVC 1.1.26