Skip to content
This repository has been archived by the owner on Jun 21, 2022. It is now read-only.

Commit

Permalink
Normal uproot.open uses new 1 MB chunking and 100 MB cache; uproot.nu…
Browse files Browse the repository at this point in the history
…mentries uses old 32 kB chunking and 1 MB cache. uproot.numentries skips streamer-reading, which is most of the beginning-of-file reading, and stops early in TTree-metadata-reading; it should typically read 2-3 32 kB chunks (64-96 kB) per file.
  • Loading branch information
jpivarski committed Nov 7, 2019
1 parent 7e6aa52 commit 098989d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion uproot/tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -2023,7 +2023,7 @@ def daskframe(path, treepath, branches=None, namedecode="utf-8", entrysteps=floa

################################################################ for quickly getting numentries

def numentries(path, treepath, total=True, localsource=MemmapSource.defaults, xrootdsource=XRootDSource.defaults, httpsource=HTTPSource.defaults, executor=None, blocking=True, **options):
def numentries(path, treepath, total=True, localsource=MemmapSource.defaults, xrootdsource={"timeout": None, "chunkbytes": 32*1024, "limitbytes": 1024**2, "parallel": False}, httpsource={"chunkbytes": 32*1024, "limitbytes": 1024**2, "parallel": False}, executor=None, blocking=True, **options):
if isinstance(path, string_types):
paths = _filename_explode(path)
else:
Expand Down

0 comments on commit 098989d

Please sign in to comment.