netcdf-c/docs
Dennis Heimbigner fb40a72b45 Improve performance of the nc_reclaim_data and nc_copy_data functions.
re: Issue https://github.com/Unidata/netcdf-c/issues/2685
re: PR https://github.com/Unidata/netcdf-c/pull/2179

As noted in PR https://github.com/Unidata/netcdf-c/pull/2179,
the old code did not allow for reclaiming instances of types,
nor for properly copying them. That PR provided new functions
capable of reclaiming/copying instances of arbitrary types.

However, as noted by Issue https://github.com/Unidata/netcdf-c/issues/2685, using these
most general functions resulted in a significant performance
degradation, even for common cases.

This PR attempts to mitigate the cost of using the general
reclaim/copy functions in two ways.

First, the previous functions operating at the top level by
using ncid and typeid arguments. These functions were augmented
with equivalent versions that used the netcdf-c library internal
data structures to allow direct access to needed information.
These new functions are used internally to the library.

The second mitigation involves optimizing the internal functions
by providing early tests for common cases. This avoids
unnecessary recursive function calls.

The overall result is a significant improvement in speed by a
factor of roughly twenty -- your mileage may vary. These
optimized functions are still not as fast as the original (more
limited) functions, but they are getting close. Additional optimizations are
possible. But the cost is a significant "uglification" of the
code that I deemed a step too far, at least for now.

## Misc. Changes
1. Added a test case to check the proper reclamation/copy of complex types.
2. Found and fixed some places where nc_reclaim/copy should have been used.
3. Replaced, in the netcdf-c library, (almost all) occurrences of nc_reclaim_copy with calls to NC_reclaim/copy. This plus the optimizations is the primary speed-up mechanism.
4. In DAP4, the metadata is held in a substrate in-memory file; this required some changes so that the reclaim/copy code accessed that substrate dispatcher rather than the DAP4 dispatcher.
5. Re-factored and isolated the code that computes if a type is (transitively) variable-sized or not.
6. Clean up the reclamation code in ncgen; adding the use of nc_reclaim exposed some memory problems.
2023-05-20 17:11:25 -06:00
..
images Correct error in make dist 2022-06-10 14:08:57 -06:00
obsolete Docs migration 2021-11-11 10:47:49 -07:00
old docs cleanup 2021-11-11 11:40:45 -07:00
static-pages Added another old static html page in preparation for updating. 2022-12-19 14:55:31 -07:00
.gitignore
all-error-codes.md Working towards writing the quick start for plugins and integrating it into doxygen. 2022-10-05 13:31:49 -06:00
architecture.dox
attribute_conventions.md Changed attribute case in documentation in support of https://github.com/Unidata/netcdf-c/issues/2481 2022-08-19 13:28:51 -06:00
auth.md Significantly Improve Amazon S3 Cloud Storage Support 2021-09-27 18:36:33 -06:00
building-with-cmake.md
byterange.md Improve S3 Documentation and Support 2023-04-25 17:15:06 -06:00
cloud.md Improve performance of the nc_reclaim_data and nc_copy_data functions. 2023-05-20 17:11:25 -06:00
CMakeLists.txt Improve S3 Documentation and Support 2023-04-25 17:15:06 -06:00
COPYRIGHT.md
credits.md Docs migration 2021-11-11 10:47:49 -07:00
dispatch.md Bring up-to-date with main 2023-01-17 16:28:45 -07:00
docmap.pdf
Doxyfile.developer Bump version strings to reflect next development version. 2023-03-13 15:43:44 -06:00
Doxyfile.in Improve S3 Documentation and Support 2023-04-25 17:15:06 -06:00
Doxyfile.user Update issue with make distcheck 2023-04-12 14:14:38 -06:00
DoxygenLayout.xml
esg.md
FAQ.md Merge branch 'main' into ejh_doc_4 2022-05-05 08:16:40 -06:00
file_format_specifications.md This PR adds EXPERIMENTAL support for accessing data in the 2020-06-28 18:02:47 -06:00
filters.md Clean up some garbled output from Doxygen. 2023-02-01 11:27:50 -07:00
footer.html Update footer.html and Doxyfile to use local Unidata image. 2021-08-24 12:38:40 -06:00
groups.dox
header.html
indexing.dox Provide a Number of fixes/improvements to NCZarr 2020-11-19 17:01:04 -07:00
inmeminternal.dox Spelling fixes 2019-09-18 08:03:01 -06:00
inmemory.md Spelling fixes 2019-09-18 08:03:01 -06:00
install-fortran.md Docs migration 2021-11-11 10:47:49 -07:00
internal.md Improve performance of the nc_reclaim_data and nc_copy_data functions. 2023-05-20 17:11:25 -06:00
known_problems.md Merge pull request #2530 from Unidata/v4.9.1-wellspring.wif 2022-11-09 12:44:18 -07:00
logging.md added fortran 2023-04-06 10:04:12 -06:00
mainpage.dox Fix DAP4 remotetest server 2022-11-15 20:29:21 -07:00
Makefile.am Improve S3 Documentation and Support 2023-04-25 17:15:06 -06:00
nczarr.md ## Addendum [5/9/23] 2023-05-09 21:13:49 -06:00
netcdf-50x50.png
netcdf.m4 Docs migration 2021-11-11 10:47:49 -07:00
notes.md fixed some doxygen warnings 2022-05-28 18:54:08 +03:00
quantize.md moved quantize error documentation 2022-06-23 09:51:09 +02:00
quickstart_filters.md re-added quickstart filters document. 2023-02-01 11:20:40 -07:00
quickstart_paths.md Improve S3 Documentation and Support 2023-04-25 17:15:06 -06:00
release_header.html Update release_header.html 2022-01-19 11:50:59 -07:00
release.css
tests.md
testserver.dox Update d4ts.war and dts.war build instructions 2021-02-26 15:14:57 -07:00
tutorial.dox more doxygen warning fixes 2022-05-03 12:54:14 -06:00
unidata_logo_cmyk.png
windows-binaries.md Incorporated GitHub-generated release notes into the manually managed release notes, and updated the list of included dependencies for Windows installer downloads. 2022-06-10 14:43:50 -06:00