microsoft / react-native-windows
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 1,536 files with 140,739 lines of code.
    • 4 very long files (10,390 lines of code)
    • 30 long files (21,357 lines of code)
    • 135 medium size files (42,159 lines of codeclsfd_ftr_w_mp_ins)
    • 213 small files (30,682 lines of code)
    • 1,154 very small files (36,151 lines of code)
7% | 15% | 29% | 21% | 25%
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
cpp17% | 18% | 28% | 18% | 16%
js7% | 18% | 30% | 22% | 21%
cs0% | 18% | 41% | 18% | 21%
h0% | 4% | 30% | 17% | 47%
tsx0% | 27% | 26% | 22% | 23%
ts0% | 10% | 34% | 35% | 20%
filters0% | 37% | 30% | 13% | 18%
vcxproj0% | 17% | 17% | 62% | 3%
ps10% | 24% | 40% | 5% | 29%
xaml0% | 0% | 0% | 74% | 25%
targets0% | 0% | 0% | 23% | 76%
props0% | 0% | 0% | 10% | 89%
cmd0% | 0% | 0% | 0% | 100%
proj0% | 0% | 0% | 0% | 100%
html0% | 0% | 0% | 0% | 100%
mustache0% | 0% | 0% | 0% | 100%
natvis0% | 0% | 0% | 0% | 100%
hbs0% | 0% | 0% | 0% | 100%
File Size per Logical Decomposition
primary
1001+
501-1000
201-500
101-200
1-100
packages/react-native-platform-override58% | 0% | 11% | 18% | 11%
vnext/ReactCommon87% | 0% | 7% | 4% | <1%
packages/@react-native-windows10% | 17% | 24% | 32% | 15%
vnext/Microsoft.ReactNative.Cxx20% | 35% | 21% | 6% | 16%
vnext/Microsoft.ReactNative0% | 21% | 27% | 20% | 30%
vnext/src0% | 30% | 32% | 17% | 19%
packages/@office-iss0% | 24% | 34% | 18% | 23%
vnext/Mso0% | 10% | 45% | 24% | 19%
vnext/Shared0% | 8% | 46% | 12% | 32%
vnext/Microsoft.ReactNative.Managed.CodeGen0% | 27% | 28% | 27% | 15%
vnext/Microsoft.ReactNative.Managed0% | 15% | 49% | 17% | 17%
vnext/Desktop0% | 24% | 22% | 29% | 24%
vnext/Folly0% | 59% | 34% | 0% | 5%
packages/react-native-windows-init0% | 95% | 0% | 0% | 4%
packages/@rnw-scripts0% | 0% | 43% | 35% | 21%
packages/@react-native0% | 0% | 34% | 37% | 28%
vnext/Microsoft.ReactNative.IntegrationTests0% | 0% | 46% | 31% | 22%
packages/sample-apps0% | 0% | 34% | 18% | 46%
vnext/Chakra0% | 0% | 52% | 30% | 16%
vnext/Scripts0% | 0% | 36% | 12% | 51%
vnext/codegen0% | 0% | 11% | 25% | 63%
vnext/Microsoft.ReactNative.ComponentTests0% | 0% | 68% | 16% | 14%
packages/playground0% | 0% | 22% | 51% | 26%
vnext/Desktop.IntegrationTests0% | 0% | 28% | 27% | 44%
vnext/template0% | 0% | 0% | 33% | 66%
vnext/Desktop.ABITests0% | 0% | 0% | 35% | 64%
vnext/Desktop.DLL0% | 0% | 0% | 87% | 12%
ROOT0% | 0% | 0% | 71% | 28%
vnext/fmt0% | 0% | 0% | 68% | 31%
vnext/Common0% | 0% | 0% | 43% | 56%
vnext/PropertySheets0% | 0% | 0% | 9% | 90%
vnext0% | 0% | 0% | 0% | 100%
vnext/stubs0% | 0% | 0% | 0% | 100%
vnext/include0% | 0% | 0% | 0% | 100%
vnext/FollyWin320% | 0% | 0% | 0% | 100%
vnext/Microsoft.ReactNative.ProjectReunion0% | 0% | 0% | 0% | 100%
packages/@rnw-bots0% | 0% | 0% | 0% | 100%
Longest Files (Top 50)
File# lines# units
Yoga.cpp
in packages/react-native-platform-override/src/e2etest/collateral/sampleOverrideRepo/ReactCommon/yoga/yoga
3655 168
Yoga.cpp
in vnext/ReactCommon
3626 168
VirtualizedList.js
in packages/@react-native-windows/virtualized-list/src
1689 40
NodeApiJsiRuntime.cpp
in vnext/Microsoft.ReactNative.Cxx/JSI
1420 120
NativeModules.h
in vnext/Microsoft.ReactNative.Cxx
985 71
NativeUIManager.cpp
in vnext/Microsoft.ReactNative/Modules
905 39
TextExample.windows.tsx
in packages/@react-native-windows/tester/src/js/examples-win/Text
863 17
autolink.ts
in packages/@react-native-windows/cli/src/runWindows/utils
852 33
vcxproj
Microsoft.ReactNative.vcxproj
in vnext/Microsoft.ReactNative
850 -
futureImpl.cpp
in vnext/Mso/src/future
842 64
filters
Microsoft.ReactNative.vcxproj.filters
in vnext/Microsoft.ReactNative
824 -
JsiApi.cpp
in vnext/Microsoft.ReactNative
820 96
ReactInstanceWin.cpp
in vnext/Microsoft.ReactNative/ReactHost
810 48
TextInputViewManager.cpp
in vnext/Microsoft.ReactNative/Views
794 24
ChakraRuntime.cpp
in vnext/Shared/JSI
773 64
JsiAbiApi.cpp
in vnext/Microsoft.ReactNative.Cxx/JSI
770 77
CodeAnalyzer.cs
in vnext/Microsoft.ReactNative.Managed.CodeGen
766 25
JSValue.cs
in vnext/Microsoft.ReactNative.Managed
745 59
JSValue.cpp
in vnext/Microsoft.ReactNative.Cxx
727 30
TextInput.windows.js
in vnext/src/Libraries/Components/TextInput
721 25
PaperUIManagerModule.cpp
in vnext/Microsoft.ReactNative/Modules
708 64
index.windows.js
in vnext/src
674 115
index.win32.js
in packages/@office-iss/react-native-win32/src
654 113
Pressability.win32.js
in packages/@office-iss/react-native-win32/src/Libraries/Pressability
631 18
Pressability.windows.js
in vnext/src/Libraries/Pressability
631 18
PressableExample.win32.js
in packages/@office-iss/react-native-win32-tester/src/js/examples-win32/Pressable
628 27
BeastWebSocketResource.cpp
in vnext/Desktop
585 61
Add-AppDevPackage.ps1
in packages/@react-native-windows/cli/powershell
581 -
TouchEventHandler.cpp
in vnext/Microsoft.ReactNative/Views
567 22
AccessibilityExampleWindows.tsx
in packages/@react-native-windows/tester/src/js/examples-win/Accessibility
553 12
filters
Folly.vcxproj.filters
in vnext/Folly
542 -
Cli.ts
in packages/react-native-windows-init/src
534 17
ReactHost.cpp
in vnext/Microsoft.ReactNative/ReactHost
516 76
oacr.h
in vnext/Mso/oacr
506 2
OInstance.cpp
in vnext/Shared
496 13
RedBox.cpp
in vnext/Microsoft.ReactNative
487 23
JSValue.h
in vnext/Microsoft.ReactNative.Cxx
484 66
KeyboardEventHandler.cpp
in vnext/Microsoft.ReactNative/Views
478 24
markdown.ts
in packages/@rnw-scripts/doxysaurus/src
476 27
Props.h
in vnext/codegen/react/components/rnwcore
476 24
ReactPropertyBagTests.cpp
in vnext/Microsoft.ReactNative.IntegrationTests
470 -
functor.h
in vnext/Mso/functional
468 45
JSValueWriter.cs
in vnext/Microsoft.ReactNative.Managed
465 65
ScrollViewManager.cpp
in vnext/Microsoft.ReactNative/Views
463 17
PropertyUtils.h
in vnext/Microsoft.ReactNative/Utils
462 24
TouchableWin32.tsx
in packages/@office-iss/react-native-win32/src/Libraries/Components/Touchable
461 5
index.ts
in packages/@react-native-windows/cli/src/generator-windows
452 13
JSValueReader.cs
in vnext/Microsoft.ReactNative.Managed
450 67
CodeGenerator.Serializers.cs
in vnext/Microsoft.ReactNative.Managed.CodeGen
440 10
AttributedViewManager.cs
in vnext/Microsoft.ReactNative.Managed
438 14
Files With Most Units (Top 20)
File# lines# units
Yoga.cpp
in packages/react-native-platform-override/src/e2etest/collateral/sampleOverrideRepo/ReactCommon/yoga/yoga
3655 168
Yoga.cpp
in vnext/ReactCommon
3626 168
NodeApiJsiRuntime.cpp
in vnext/Microsoft.ReactNative.Cxx/JSI
1420 120
index.windows.js
in vnext/src
674 115
index.win32.js
in packages/@office-iss/react-native-win32/src
654 113
JsiApi.cpp
in vnext/Microsoft.ReactNative
820 96
JsiAbiApi.cpp
in vnext/Microsoft.ReactNative.Cxx/JSI
770 77
ReactHost.cpp
in vnext/Microsoft.ReactNative/ReactHost
516 76
NativeModules.h
in vnext/Microsoft.ReactNative.Cxx
985 71
JSValueReader.cs
in vnext/Microsoft.ReactNative.Managed
450 67
JSValue.h
in vnext/Microsoft.ReactNative.Cxx
484 66
JSValueWriter.cs
in vnext/Microsoft.ReactNative.Managed
465 65
PaperUIManagerModule.cpp
in vnext/Microsoft.ReactNative/Modules
708 64
futureImpl.cpp
in vnext/Mso/src/future
842 64
ChakraRuntime.cpp
in vnext/Shared/JSI
773 64
BeastWebSocketResource.cpp
in vnext/Desktop
585 61
RNTesterList.windows.js
in packages/@react-native-windows/tester/src/js/utils
314 60
JSValue.cs
in vnext/Microsoft.ReactNative.Managed
745 59
RNTesterList.ios.js
in packages/@react-native/tester/js/utils
319 58
RNTesterList.android.js
in packages/@react-native/tester/js/utils
279 52
Files With Long Lines (Top 20)

There are 234 files with lines longer than 120 characters. In total, there are 1402 long lines.

File# lines# units# long lines
NativeUIManagerSpec.g.h
in vnext/codegen
163 1 53
vcxproj
Microsoft.ReactNative.vcxproj
in vnext/Microsoft.ReactNative
850 - 49
NativeAnimatedModuleSpec.g.h
in vnext/codegen
157 1 39
NativeAnimatedTurboModuleSpec.g.h
in vnext/codegen
157 1 39
NativePushNotificationManagerIOSSpec.g.h
in vnext/codegen
160 1 35
index.windows.js
in packages/sample-apps
315 16 34
CodeAnalyzer.cs
in vnext/Microsoft.ReactNative.Managed.CodeGen
766 25 30
xaml
DevMenuControl.xaml
in vnext/Microsoft.ReactNative
153 - 27
Props.h
in vnext/codegen/react/components/rnwcore
476 24 26
Add-AppDevPackage.ps1
in packages/@react-native-windows/cli/powershell
581 - 22
props
CppAppConsumeCSharpModule.props
in vnext/PropertySheets
36 - 22
NativeAccessibilityManagerSpec.g.h
in vnext/codegen
105 1 22
vcxproj
WithExperimentalFeaturesProps.vcxproj
in packages/@react-native-windows/cli/src/e2etest/projects/WithExperimentalFeaturesProps/windows/WithExperimentalFeaturesProps
191 - 19
vcxproj
WithUseExperimentalNuget.vcxproj
in packages/@react-native-windows/cli/src/e2etest/projects/WithUseExperimentalNuget/windows/WithUseExperimentalNuget
191 - 19
vcxproj
WithUseExperimentalNugetSetInProject.vcxproj
in packages/@react-native-windows/cli/src/e2etest/projects/WithUseExperimentalNugetSetInProject/windows/WithUseExperimentalNugetSetInProject
192 - 19
Props.cpp
in vnext/codegen/react/components/rnwcore
186 - 18
NativeAsyncLocalStorageSpec.g.h
in vnext/codegen
91 1 17
NativeAsyncSQLiteDBStorageSpec.g.h
in vnext/codegen
91 1 17
DiagnosticDescriptors.cs
in vnext/Microsoft.ReactNative.Managed.CodeGen
128 - 16
props
Bundle.props
in vnext/PropertySheets
35 - 16