anthropics / orjson
File Size

The distribution of size of files (measured in lines of code).

Intro
  • File size measurements show the distribution of size of files.
  • Files are classified in four categories based on their size (lines of code): 1-100 (very small files), 101-200 (small files), 201-500 (medium size files), 501-1000 (long files), 1001+(very long files).
  • It is a good practice to keep files small. Long files may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
File Size Overall
  • There are 87 files with 20,185 lines of code.
    • 3 very long files (12,623 lines of code)
    • 2 long files (1,062 lines of code)
    • 10 medium size files (2,659 lines of code)
    • 9 small files (1,296 lines of code)
    • 63 very small files (2,545 lines of code)
62% | 5% | 13% | 6% | 12%
Legend:
1001+
501-1000
201-500
101-200
1-100


explore: grouped by folders | grouped by size | sunburst | 3D view
File Size per Extension
1001+
501-1000
201-500
101-200
1-100
c100% | 0% | 0% | 0% | 0%
h100% | 0% | 0% | 0% | 0%
rs15% | 12% | 30% | 14% | 27%
py0% | 0% | 0% | 0% | 100%
pyi0% | 0% | 0% | 0% | 100%
toml0% | 0% | 0% | 0% | 100%
File Size per Logical Decomposition
primary
1001+
501-1000
201-500
101-200
1-100
include100% | 0% | 0% | 0% | 0%
src15% | 12% | 30% | 14% | 26%
ROOT0% | 0% | 0% | 0% | 100%
bench0% | 0% | 0% | 0% | 100%
pysrc0% | 0% | 0% | 0% | 100%
integration0% | 0% | 0% | 0% | 100%
ci0% | 0% | 0% | 0% | 100%
Longest Files (Top 50)
File# lines# units
yyjson.c
in include/yyjson
7308 128
yyjson.h
in include/yyjson
3969 200
numpy.rs
in src/serialize/per_type
1346 73
dict.rs
in src/serialize/per_type
540 15
json.rs
in src/serialize/writer
522 65
lib.rs
in src
396 1
formatter.rs
in src/serialize/writer
331 27
yyjson.rs
in src/deserialize/backend
318 14
pyintref.rs
in src/ffi
259 4
util.rs
in src
253 -
compat.rs
in src/ffi
237 -
datetime.rs
in src/serialize/per_type
226 8
object.rs
in src/ffi/pystrref
224 4
208 1
list.rs
in src/serialize/per_type
207 2
fragment.rs
in src/ffi
198 1
dataclass.rs
in src/serialize/per_type
195 3
byteswriter.rs
in src/serialize/writer
188 13
obtype.rs
in src/serialize
138 -
serializer.rs
in src/serialize
133 1
escape.rs
in src/serialize/writer/str
131 -
datetimelike.rs
in src/serialize/per_type
105 1
pydictref.rs
in src/ffi
104 1
mod.rs
in src/ffi
104 -
num.rs
in src/serialize/writer
99 2
pymemoryview.rs
in src/ffi
88 1
sse2.rs
in src/serialize/writer/str
88 -
87 -
pytorch.rs
in src/serialize/per_type
85 1
int.rs
in src/serialize/per_type
85 2
pylistref.rs
in src/ffi
77 1
input.rs
in src/deserialize
77 2
generic.rs
in src/serialize/writer/str
77 -
error.rs
in src/serialize
74 1
build.rs
in root
71 2
avx512.rs
in src/serialize/writer/str
67 -
pyunicode_new.rs
in src/ffi/pystrref
64 -
ffi.rs
in src/deserialize/backend
63 -
avx512.rs
in src/ffi/pystrref
61 -
60 1
buffer.rs
in src/serialize
59 4
pytupleref.rs
in src/ffi
58 1
pybytesref.rs
in src/ffi
58 1
57 1
default.rs
in src/serialize/per_type
51 1
unicode.rs
in src/serialize/per_type
51 2
pyuuidref.rs
in src/ffi
46 1
pyboolref.rs
in src/ffi
46 1
state.rs
in src/serialize
45 -
deserializer.rs
in src/deserialize
44 -
Files With Most Units (Top 50)
File# lines# units
yyjson.h
in include/yyjson
3969 200
yyjson.c
in include/yyjson
7308 128
numpy.rs
in src/serialize/per_type
1346 73
json.rs
in src/serialize/writer
522 65
formatter.rs
in src/serialize/writer
331 27
dict.rs
in src/serialize/per_type
540 15
yyjson.rs
in src/deserialize/backend
318 14
byteswriter.rs
in src/serialize/writer
188 13
datetime.rs
in src/serialize/per_type
226 8
object.rs
in src/ffi/pystrref
224 4
pyintref.rs
in src/ffi
259 4
buffer.rs
in src/serialize
59 4
dataclass.rs
in src/serialize/per_type
195 3
input.rs
in src/deserialize
77 2
unicode.rs
in src/serialize/per_type
51 2
list.rs
in src/serialize/per_type
207 2
int.rs
in src/serialize/per_type
85 2
num.rs
in src/serialize/writer
99 2
pyi
__init__.pyi
in pysrc/orjson
33 2
build.rs
in root
71 2
lib.rs
in src
396 1
208 1
pydictref.rs
in src/ffi
104 1
pylistref.rs
in src/ffi
77 1
pytupleref.rs
in src/ffi
58 1
60 1
pyfloatref.rs
in src/ffi
39 1
pybytesref.rs
in src/ffi
58 1
fragment.rs
in src/ffi
198 1
pyuuidref.rs
in src/ffi
46 1
57 1
pynoneref.rs
in src/ffi
41 1
pyboolref.rs
in src/ffi
46 1
pymemoryview.rs
in src/ffi
88 1
cache.rs
in src/deserialize
27 1
serializer.rs
in src/serialize
133 1
default.rs
in src/serialize/per_type
51 1
float.rs
in src/serialize/per_type
29 1
none.rs
in src/serialize/per_type
16 1
pytorch.rs
in src/serialize/per_type
85 1
pybool.rs
in src/serialize/per_type
20 1
fragment.rs
in src/serialize/per_type
26 1
uuid.rs
in src/serialize/per_type
41 1
pyenum.rs
in src/serialize/per_type
26 1
datetimelike.rs
in src/serialize/per_type
105 1
error.rs
in src/serialize
74 1
util.py
in bench
13 1
data.py
in bench
28 1
12 1
13 1
Files With Long Lines (Top 1)

There is only one file with lines longer than 120 characters. In total, there is only one long line.

File# lines# units# long lines
lib.rs
in src
396 1 1
Correlations

File Size vs. Commits (all time): 87 points

pysrc/orjson/__init__.pyi x: 8 commits (all time) y: 33 lines of code src/deserialize/backend/yyjson.rs x: 17 commits (all time) y: 318 lines of code src/deserialize/deserializer.rs x: 32 commits (all time) y: 44 lines of code src/ffi/mod.rs x: 35 commits (all time) y: 104 lines of code src/lib.rs x: 139 commits (all time) y: 396 lines of code src/serialize/obtype.rs x: 10 commits (all time) y: 138 lines of code src/serialize/per_type/dict.rs x: 30 commits (all time) y: 540 lines of code src/serialize/per_type/float.rs x: 10 commits (all time) y: 29 lines of code src/serialize/per_type/list.rs x: 23 commits (all time) y: 207 lines of code src/serialize/per_type/numpy.rs x: 29 commits (all time) y: 1346 lines of code src/serialize/per_type/pytorch.rs x: 3 commits (all time) y: 85 lines of code src/serialize/serializer.rs x: 46 commits (all time) y: 133 lines of code src/typeref.rs x: 90 commits (all time) y: 208 lines of code pysrc/orjson/__init__.py x: 5 commits (all time) y: 25 lines of code src/opt.rs x: 13 commits (all time) y: 35 lines of code src/serialize/error.rs x: 14 commits (all time) y: 74 lines of code src/serialize/per_type/mod.rs x: 9 commits (all time) y: 33 lines of code build.rs x: 50 commits (all time) y: 71 lines of code include/yyjson/yyjson.c x: 16 commits (all time) y: 7308 lines of code src/serialize/writer/json.rs x: 22 commits (all time) y: 522 lines of code src/serialize/writer/num.rs x: 3 commits (all time) y: 99 lines of code bench/benchmark_dumps.py x: 17 commits (all time) y: 12 lines of code bench/data.py x: 7 commits (all time) y: 28 lines of code bench/util.py x: 13 commits (all time) y: 13 lines of code src/deserialize/cache.rs x: 28 commits (all time) y: 27 lines of code src/deserialize/error.rs x: 12 commits (all time) y: 38 lines of code src/ffi/buffer.rs x: 11 commits (all time) y: 25 lines of code src/ffi/compat.rs x: 12 commits (all time) y: 237 lines of code src/ffi/pydictref.rs x: 2 commits (all time) y: 104 lines of code src/ffi/pystrref/pyunicode_new.rs x: 2 commits (all time) y: 64 lines of code src/serialize/writer/str/escape.rs x: 7 commits (all time) y: 131 lines of code src/serialize/writer/formatter.rs x: 9 commits (all time) y: 331 lines of code src/serialize/writer/mod.rs x: 10 commits (all time) y: 11 lines of code src/deserialize/pyobject.rs x: 26 commits (all time) y: 37 lines of code src/ffi/fragment.rs x: 23 commits (all time) y: 198 lines of code src/ffi/pyboolref.rs x: 1 commits (all time) y: 46 lines of code src/ffi/pyintref.rs x: 1 commits (all time) y: 259 lines of code src/ffi/pylistref.rs x: 1 commits (all time) y: 77 lines of code src/ffi/pystrref/object.rs x: 2 commits (all time) y: 224 lines of code src/serialize/per_type/dataclass.rs x: 19 commits (all time) y: 195 lines of code src/serialize/per_type/fragment.rs x: 12 commits (all time) y: 26 lines of code src/serialize/per_type/int.rs x: 17 commits (all time) y: 85 lines of code src/serialize/per_type/uuid.rs x: 16 commits (all time) y: 41 lines of code src/util.rs x: 53 commits (all time) y: 253 lines of code src/ffi/utf8.rs x: 1 commits (all time) y: 20 lines of code src/serialize/per_type/datetime.rs x: 17 commits (all time) y: 226 lines of code integration/typestubs.py x: 4 commits (all time) y: 3 lines of code integration/wsgi.py x: 9 commits (all time) y: 22 lines of code src/alloc.rs x: 5 commits (all time) y: 30 lines of code src/deserialize/backend/ffi.rs x: 4 commits (all time) y: 63 lines of code src/serialize/buffer.rs x: 7 commits (all time) y: 59 lines of code src/serialize/mod.rs x: 21 commits (all time) y: 8 lines of code src/serialize/per_type/datetimelike.rs x: 13 commits (all time) y: 105 lines of code src/serialize/per_type/pyenum.rs x: 6 commits (all time) y: 26 lines of code src/serialize/writer/byteswriter.rs x: 16 commits (all time) y: 188 lines of code src/serialize/writer/str/avx512.rs x: 10 commits (all time) y: 67 lines of code src/serialize/writer/str/sse2.rs x: 8 commits (all time) y: 88 lines of code include/yyjson/yyjson.h x: 13 commits (all time) y: 3969 lines of code bench/__init__.py x: 2 commits (all time) y: 1 lines of code
7308.0
lines of code
  min: 1.0
  average: 232.01
  25th percentile: 26.0
  median: 57.0
  75th percentile: 105.0
  max: 7308.0
0 139.0
commits (all time)
min: 1.0 | average: 13.53 | 25th percentile: 3.0 | median: 9.0 | 75th percentile: 16.0 | max: 139.0

File Size vs. Contributors (all time): 87 points

pysrc/orjson/__init__.pyi x: 4 contributors (all time) y: 33 lines of code src/deserialize/backend/yyjson.rs x: 3 contributors (all time) y: 318 lines of code src/deserialize/deserializer.rs x: 5 contributors (all time) y: 44 lines of code src/ffi/mod.rs x: 4 contributors (all time) y: 104 lines of code src/lib.rs x: 10 contributors (all time) y: 396 lines of code src/serialize/obtype.rs x: 4 contributors (all time) y: 138 lines of code src/serialize/per_type/dict.rs x: 4 contributors (all time) y: 540 lines of code src/serialize/per_type/list.rs x: 4 contributors (all time) y: 207 lines of code src/serialize/per_type/numpy.rs x: 4 contributors (all time) y: 1346 lines of code src/serialize/per_type/pytorch.rs x: 3 contributors (all time) y: 85 lines of code src/serialize/serializer.rs x: 6 contributors (all time) y: 133 lines of code src/typeref.rs x: 12 contributors (all time) y: 208 lines of code pysrc/orjson/__init__.py x: 2 contributors (all time) y: 25 lines of code src/opt.rs x: 2 contributors (all time) y: 35 lines of code src/serialize/error.rs x: 2 contributors (all time) y: 74 lines of code build.rs x: 4 contributors (all time) y: 71 lines of code include/yyjson/yyjson.c x: 2 contributors (all time) y: 7308 lines of code src/serialize/writer/json.rs x: 2 contributors (all time) y: 522 lines of code src/serialize/writer/num.rs x: 2 contributors (all time) y: 99 lines of code src/deserialize/cache.rs x: 1 contributors (all time) y: 27 lines of code src/deserialize/error.rs x: 3 contributors (all time) y: 38 lines of code src/ffi/compat.rs x: 1 contributors (all time) y: 237 lines of code src/ffi/pydictref.rs x: 1 contributors (all time) y: 104 lines of code src/ffi/pystrref/pyunicode_new.rs x: 1 contributors (all time) y: 64 lines of code src/serialize/writer/str/escape.rs x: 1 contributors (all time) y: 131 lines of code src/serialize/writer/formatter.rs x: 1 contributors (all time) y: 331 lines of code src/deserialize/pyobject.rs x: 1 contributors (all time) y: 37 lines of code src/ffi/fragment.rs x: 2 contributors (all time) y: 198 lines of code src/ffi/pyintref.rs x: 1 contributors (all time) y: 259 lines of code src/ffi/pystrref/object.rs x: 1 contributors (all time) y: 224 lines of code src/serialize/per_type/dataclass.rs x: 1 contributors (all time) y: 195 lines of code src/util.rs x: 2 contributors (all time) y: 253 lines of code include/yyjson/yyjson.h x: 1 contributors (all time) y: 3969 lines of code
7308.0
lines of code
  min: 1.0
  average: 232.01
  25th percentile: 26.0
  median: 57.0
  75th percentile: 105.0
  max: 7308.0
0 12.0
contributors (all time)
min: 1.0 | average: 1.86 | 25th percentile: 1.0 | median: 1.0 | 75th percentile: 2.0 | max: 12.0

File Size vs. Commits (30 days): 0 points

No data for "commits (30d)" vs. "lines of code".

File Size vs. Contributors (30 days): 0 points

No data for "contributors (30d)" vs. "lines of code".


File Size vs. Commits (90 days): 13 points

pysrc/orjson/__init__.pyi x: 2 commits (90d) y: 33 lines of code src/deserialize/backend/yyjson.rs x: 2 commits (90d) y: 318 lines of code src/deserialize/deserializer.rs x: 2 commits (90d) y: 44 lines of code src/ffi/mod.rs x: 2 commits (90d) y: 104 lines of code src/lib.rs x: 2 commits (90d) y: 396 lines of code src/serialize/obtype.rs x: 2 commits (90d) y: 138 lines of code src/serialize/per_type/dict.rs x: 2 commits (90d) y: 540 lines of code src/serialize/per_type/float.rs x: 2 commits (90d) y: 29 lines of code src/serialize/per_type/list.rs x: 2 commits (90d) y: 207 lines of code src/serialize/per_type/numpy.rs x: 2 commits (90d) y: 1346 lines of code src/serialize/per_type/pytorch.rs x: 2 commits (90d) y: 85 lines of code src/serialize/serializer.rs x: 2 commits (90d) y: 133 lines of code
1346.0
lines of code
  min: 29.0
  average: 275.46
  25th percentile: 64.5
  median: 138.0
  75th percentile: 357.0
  max: 1346.0
0 2.0
commits (90d)
min: 2.0 | average: 2.0 | 25th percentile: 2.0 | median: 2.0 | 75th percentile: 2.0 | max: 2.0

File Size vs. Contributors (90 days): 13 points

pysrc/orjson/__init__.pyi x: 2 contributors (90d) y: 33 lines of code src/deserialize/backend/yyjson.rs x: 2 contributors (90d) y: 318 lines of code src/deserialize/deserializer.rs x: 2 contributors (90d) y: 44 lines of code src/ffi/mod.rs x: 2 contributors (90d) y: 104 lines of code src/lib.rs x: 2 contributors (90d) y: 396 lines of code src/serialize/obtype.rs x: 2 contributors (90d) y: 138 lines of code src/serialize/per_type/dict.rs x: 2 contributors (90d) y: 540 lines of code src/serialize/per_type/float.rs x: 2 contributors (90d) y: 29 lines of code src/serialize/per_type/list.rs x: 2 contributors (90d) y: 207 lines of code src/serialize/per_type/numpy.rs x: 2 contributors (90d) y: 1346 lines of code src/serialize/per_type/pytorch.rs x: 2 contributors (90d) y: 85 lines of code src/serialize/serializer.rs x: 2 contributors (90d) y: 133 lines of code
1346.0
lines of code
  min: 29.0
  average: 275.46
  25th percentile: 64.5
  median: 138.0
  75th percentile: 357.0
  max: 1346.0
0 2.0
contributors (90d)
min: 2.0 | average: 2.0 | 25th percentile: 2.0 | median: 2.0 | 75th percentile: 2.0 | max: 2.0