Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
[io] Turn on async prefetching by default.
  • Loading branch information
Axel-Naumann committed Sep 1, 2023
commit 13d57dc0fe7d99264cd17b5ae66aec9e48ddf160
3 changes: 3 additions & 0 deletions README/ReleaseNotes/v630/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ The following people have contributed to this new version:

## I/O Libraries

Asyncronous prefetching is now enabled.
Turn if off by setting `TFile.AsyncPrefetching` to `0` in `rootrc`.


## TTree Libraries

Expand Down
2 changes: 1 addition & 1 deletion config/rootrc.in
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ RSA.KeyType: 1
#TFile.AsyncReading: no

# Control the usage of asynchronous prefetching capabilities irrespective
# of the TFile implementation. By default it is disabled.
# of the TFile implementation. By default it is enabled.
#TFile.AsyncPrefetching: no

# Enable cross-protocol redirects
Expand Down
2 changes: 1 addition & 1 deletion io/io/src/TFileCacheRead.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ TFileCacheRead::TFileCacheRead(TFile *file, Int_t buffersize, TObject *tree)

//initialise the prefetch object and set the cache directory
// start the thread only if the file is not local
fEnablePrefetching = gEnv->GetValue("TFile.AsyncPrefetching", 0);
fEnablePrefetching = gEnv->GetValue("TFile.AsyncPrefetching", 1);

if (fEnablePrefetching && file && strcmp(file->GetEndpointUrl()->GetProtocol(), "file")){
SetEnablePrefetchingImpl(true);
Expand Down