firebase / firebase-js-sdk
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 969 files with 89,086 lines of code.
    • 6 very long files (6,885 lines of code)
    • 19 long files (13,556 lines of code)
    • 76 medium size files (24,056 lines of codeclsfd_ftr_w_mp_ins)
    • 133 small files (18,875 lines of code)
    • 735 very small files (25,714 lines of code)
7% | 15% | 27% | 21% | 28%
Legend:
1001+
501-1000
201-500
101-200
1-100


explore: zoomable circles | sunburst | 3D view
File Size per Extension
1001+
501-1000
201-500
101-200
1-100
ts8% | 14% | 27% | 21% | 28%
proto0% | 44% | 24% | 15% | 16%
js0% | 0% | 16% | 32% | 50%
yaml0% | 0% | 100% | 0% | 0%
hbs0% | 0% | 0% | 0% | 100%
css0% | 0% | 0% | 0% | 100%
html0% | 0% | 0% | 0% | 100%
File Size per Logical Decomposition
primary
1001+
501-1000
201-500
101-200
1-100
packages/firestore10% | 26% | 33% | 15% | 14%
packages/database16% | 21% | 33% | 12% | 15%
packages/firestore-compat67% | 0% | 0% | 0% | 32%
repo-scripts/api-documenter0% | 34% | 22% | 20% | 23%
packages/database-compat0% | 52% | 0% | 11% | 36%
repo-scripts/size-analysis0% | 41% | 31% | 0% | 27%
packages/auth0% | 0% | 21% | 33% | 45%
packages/storage0% | 0% | 51% | 26% | 21%
scripts/docgen-compat0% | 0% | 73% | 0% | 26%
packages/auth-compat0% | 0% | 43% | 21% | 35%
packages/analytics0% | 0% | 25% | 41% | 32%
repo-scripts/prune-dts0% | 0% | 68% | 31% | 0%
scripts/build0% | 0% | 82% | 0% | 17%
packages/component0% | 0% | 60% | 0% | 39%
packages/performance0% | 0% | 15% | 38% | 45%
packages/app-check0% | 0% | 15% | 47% | 36%
packages/firebase0% | 0% | 49% | 0% | 50%
packages/messaging0% | 0% | 0% | 43% | 56%
packages/util0% | 0% | 0% | 48% | 51%
packages/remote-config0% | 0% | 0% | 41% | 58%
packages/installations0% | 0% | 0% | 23% | 76%
packages/functions0% | 0% | 0% | 28% | 71%
packages/logger0% | 0% | 0% | 74% | 25%
scripts/ci-test0% | 0% | 0% | 59% | 40%
scripts/ci0% | 0% | 0% | 53% | 46%
config0% | 0% | 0% | 73% | 26%
packages/app0% | 0% | 0% | 27% | 72%
scripts/size_report0% | 0% | 0% | 56% | 43%
packages/webchannel-wrapper0% | 0% | 0% | 62% | 37%
packages/storage-compat0% | 0% | 0% | 26% | 73%
scripts0% | 0% | 0% | 44% | 55%
scripts/docgen0% | 0% | 0% | 100% | 0%
packages/rules-unit-testing0% | 0% | 0% | 25% | 74%
packages/app-compat0% | 0% | 0% | 22% | 77%
scripts/release0% | 0% | 0% | 22% | 77%
config/functions0% | 0% | 0% | 100% | 0%
scripts/format0% | 0% | 0% | 0% | 100%
packages/app-check-compat0% | 0% | 0% | 0% | 100%
packages/messaging-compat0% | 0% | 0% | 0% | 100%
packages/remote-config-compat0% | 0% | 0% | 0% | 100%
packages/analytics-compat0% | 0% | 0% | 0% | 100%
tools0% | 0% | 0% | 0% | 100%
packages/functions-compat0% | 0% | 0% | 0% | 100%
packages/installations-compat0% | 0% | 0% | 0% | 100%
scripts/emulator-testing0% | 0% | 0% | 0% | 100%
scripts/extract-deps0% | 0% | 0% | 0% | 100%
packages/performance-compat0% | 0% | 0% | 0% | 100%
repo-scripts/changelog-generator0% | 0% | 0% | 0% | 100%
integration/firestore0% | 0% | 0% | 0% | 100%
packages/template0% | 0% | 0% | 0% | 100%
integration/compat-typings0% | 0% | 0% | 0% | 100%
integration/messaging0% | 0% | 0% | 0% | 100%
integration/compat-interop0% | 0% | 0% | 0% | 100%
Longest Files (Top 50)
File# lines# units
firestore_proto_api.ts
in packages/firestore/src/protos
1235 19
sync_engine_impl.ts
in packages/firestore/src/core
1202 55
Repo.ts
in packages/database/src/core
1176 40
Reference_impl.ts
in packages/database/src/api
1125 61
database.ts
in packages/firestore-compat/src/api
1105 36
serializer.ts
in packages/firestore/src/remote
1042 81
local_store_impl.ts
in packages/firestore/src/local
989 31
MarkdownDocumenter.ts
in repo-scripts/api-documenter/src/documenters
915 15
PersistentConnection.ts
in packages/database/src/core
899 40
shared_client_state.ts
in packages/firestore/src/local
802 29
ViewProcessor.ts
in packages/database/src/core/view
796 14
user_data_reader.ts
in packages/firestore/src/lite-api
776 31
proto
firestore.proto
in packages/firestore/src/protos/google/firestore/v1
770 -
proto
descriptor.proto
in packages/firestore/src/protos/google/protobuf
751 -
indexeddb_persistence.ts
in packages/firestore/src/local
749 27
SyncTree.ts
in packages/database/src/core
712 29
target.ts
in packages/firestore/src/core
711 32
remote_store.ts
in packages/firestore/src/remote
653 40
query.ts
in packages/firestore/src/lite-api
607 22
WriteTree.ts
in packages/database/src/core
600 26
simple_db.ts
in packages/firestore/src/local
583 20
Reference.ts
in packages/database-compat/src/api
582 9
firestore_client.ts
in packages/firestore/src/core
571 32
values.ts
in packages/firestore/src/model
568 42
analysis-helper.ts
in repo-scripts/size-analysis
522 16
task.ts
in packages/storage/src
496 22
requests.ts
in packages/storage/src/implementation
491 29
errors.ts
in packages/auth/src/core
486 2
indexeddb_mutation_queue.ts
in packages/firestore/src/local
484 10
BrowserPollConnection.ts
in packages/database/src/realtime
475 21
persistent_stream.ts
in packages/firestore/src/remote
471 18
SortedMap.ts
in packages/database/src/core/util
467 11
util.ts
in packages/database/src/core/util
454 31
sorted_map.ts
in packages/firestore/src/util
447 16
auth_impl.ts
in packages/auth/src/core/auth
443 21
credentials.ts
in packages/firestore/src/api
436 9
query.ts
in packages/firestore/src/core
431 29
reference_impl.ts
in packages/firestore/src/api
430 31
validation.ts
in packages/database/src/core/util
419 17
watch_change.ts
in packages/firestore/src/remote
417 13
indexeddb_remote_document_cache.ts
in packages/firestore/src/local
416 15
indexeddb_schema_converter.ts
in packages/firestore/src/local
415 20
ChildrenNode.ts
in packages/database/src/core/snap
415 3
Connection.ts
in packages/database/src/realtime
413 30
memory_persistence.ts
in packages/firestore/src/local
403 8
bundle-analysis.ts
in repo-scripts/size-analysis
400 21
mutation.ts
in packages/firestore/src/model
397 25
api.ts
in packages/analytics/src
391 30
prune-dts.ts
in repo-scripts/prune-dts
385 12
proto
http.proto
in packages/firestore/src/protos/google/api
358 -
Files With Most Units (Top 20)
File# lines# units
serializer.ts
in packages/firestore/src/remote
1042 81
Reference_impl.ts
in packages/database/src/api
1125 61
sync_engine_impl.ts
in packages/firestore/src/core
1202 55
values.ts
in packages/firestore/src/model
568 42
remote_store.ts
in packages/firestore/src/remote
653 40
PersistentConnection.ts
in packages/database/src/core
899 40
Repo.ts
in packages/database/src/core
1176 40
database.ts
in packages/firestore-compat/src/api
1105 36
firestore_client.ts
in packages/firestore/src/core
571 32
target.ts
in packages/firestore/src/core
711 32
local_store_impl.ts
in packages/firestore/src/local
989 31
reference_impl.ts
in packages/firestore/src/api
430 31
user_data_reader.ts
in packages/firestore/src/lite-api
776 31
util.ts
in packages/database/src/core/util
454 31
api.ts
in packages/analytics/src
391 30
Connection.ts
in packages/database/src/realtime
413 30
shared_client_state.ts
in packages/firestore/src/local
802 29
query.ts
in packages/firestore/src/core
431 29
requests.ts
in packages/storage/src/implementation
491 29
error.ts
in packages/storage/src/implementation
244 29
Files With Long Lines (Top 19)

There are 19 files with lines longer than 120 characters. In total, there are 24 long lines.

File# lines# units# long lines
input_validation.ts
in packages/firestore/src/util
128 9 2
fetch_provider.ts
in packages/auth/src/core/util
52 4 2
util.ts
in packages/rules-unit-testing/src
95 5 2
Database.ts
in packages/database/src/api
240 13 2
index.ts
in repo-scripts/changelog-generator
88 3 2
hbs
default.hbs
in scripts/docgen-compat/theme/layouts
29 - 1
check_changeset.ts
in scripts/ci
157 4 1
indexeddb_schema.ts
in packages/firestore/src/local
254 4 1
proto
write.proto
in packages/firestore/src/protos/google/firestore/v1
229 - 1
proto
common.proto
in packages/firestore/src/protos/google/firestore/v1
72 - 1
proto
firestore.proto
in packages/firestore/src/protos/google/firestore/v1
770 - 1
proto
timestamp.proto
in packages/firestore/src/protos/google/protobuf
131 - 1
errors.ts
in packages/auth/src/core
486 2 1
client.ts
in packages/app-check/src
109 4 1
api.ts
in packages/app-check/src
164 8 1
onDisconnect.ts
in packages/database-compat/src/api
89 - 1
remote_config_service.ts
in packages/performance/src/services
182 8 1
cli.ts
in repo-scripts/size-analysis
71 - 1
BaseAction.ts
in repo-scripts/api-documenter/src/cli
131 4 1