-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Save some additional memory allocations #1
Save some additional memory allocations #1
Conversation
1d8a89b
to
8bf84ea
Compare
// Make sure we set .type before any other properties (setting .value | ||
// before .type means .value is lost in IE11 and below) | ||
type: undefined, | ||
}, DisabledInputUtils.getNativeProps(inst, props), { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm keeping this { type: undefined }
default for now, but is this relying on key insertion order? If not, could we replace this with something later like:
// Make sure we set .type, otherwise .value is lost in IE11 and below
nativeProps.type = nativeProps.type == null ? undefined: nativeProps;
If this isn't the case, we could save another allocation per input
.
if (!props.disabled) { | ||
return props; | ||
assignWithNativeProps: function(a,b,c,d,e,f,g) { | ||
invariant(!g, 'assignWithNativeProps only accepts 6 arguments'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't feel awesome, but I wanted to lean on assign
as before and didn't want to slice
arguments into another allocation.
8bf84ea
to
6e97642
Compare
Improve symbol check for (local) polyfills
* Remove PooledClass from FallbackCompositionState The only module that uses FallbackCompositonState is BeforeInputEventPlugin. The way its structured means there can only be a single instance of FallbackCompositionState at any given time (stored in a local variable at the top-level) so we don't really need pooling here at all. Instead, a single object is now stored in FallbackCompositionState, and access (initializing, reseting, getting data) is gaurded by the exported helper object. * Use new FallbackCompositionState API in BeforeInputEventPlugin * Implement event-specific pooling in SyntheticEvent * Remove PooledClass from TopLevelCallbackBookKeeping * Update results.json * Add pooled event test fixtures (#1) * Fix fixture lint
No description provided.