Closed
Description
Search Terms:
high memory usage heap react
Code
export type ScheduleProps = {
// ...
eventContentComponent?: React.ElementType<EventContentProps>;
eventRootComponent?: React.ElementType<EventRootProps>;
};
Expected behavior:
Compiled.
Actual behavior:
$ tsc --project . --noEmit
<--- Last few GCs --->
[15840:0x2897f30] 25267 ms: Mark-sweep 1335.2 (1446.8) -> 1327.9 (1449.3) MB, 938.0 / 0.0 ms (average mu = 0.195, current mu = 0.058) allocation failure scavenge might not succeed
[15840:0x2897f30] 26971 ms: Mark-sweep 1339.7 (1449.3) -> 1332.1 (1450.8) MB, 1650.9 / 0.0 ms (average mu = 0.096, current mu = 0.031) allocation failure scavenge might not succeed
<--- JS stacktrace --->
==== JS stack trace =========================================
0: ExitFrame [pc: 0x38acc9bdbe1d]
1: StubFrame [pc: 0x38acc9ba236e]
Security context: 0x23118b41e6e1 <JSObject>
2: slice [0x23118b406d09](this=0x26806be58fb9 <JSArray[12]>,0)
3: /* anonymous */(aka /* anonymous */) [0x367b1a96a1f9] [/home/f/Projects/remotelock/react-week-scheduler/node_modules/typescript/lib/tsc.js:~32894] [pc=0x38acca56d751](this=0x2aaba17826f1 <undefined>,t=0x0e1171e59ff9 <Type map = 0x12d8538d48a1>)
Repo: https://github.com/remotelock/react-week-scheduler
Steps to reproduce:
- Clone repo
git checkout 9c64f4f7224d199d9706c4fdec4cd073292c1842
yarn
yarn check-ts
Replacing React.ElementType
here (L25 & 27) with any
works around the bug.