Performance Issues setting a numeric string in the name prop of Field component
See original GitHub issueI am creating a form that will send through a json string where the name of the field is the membersID (a numeric string).
My Field Component is looking like this.
<Field label="hours" name={
[‘member’][${member.id}]['hours]} type="number" component={renderField} />
renderField
The member object looks like this
{ "id": "234521", "name": "John", }
This appeared to work well when I was testing with small member ids as shown below
But when I use actual member ids it can take several seconds (over 10) to get a response as I notice it is creating a null object for each number from 0 to the highest memberID. (this also happened with the small numbers but no performance issue)
eg
saveMemberData() { console.log(Date.now()); console.log('saveMemberData',this.props.formData); }
Is there another way I can approach this or is there an issue with the library?
Issue Analytics
- State:
- Created 7 years ago
- Reactions:1
- Comments:11 (2 by maintainers)
Top GitHub Comments
I’ve a suspicion that the redux viewer is causing the performance problem by iterating over the sparse array. Could you measure the performance again after turning off the redux viewer?
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.