Skip to content

Some component renders are very slow #211

@Designer023

Description

@Designer023

Issue Type

Description

V4 styled components are causing the render time of my app to grow massivly. Running a profiler I see that Label and Button are the main culprits

Steps to reproduce

I don't have a demo

  • Create app
  • Add a few rows/ columns with Button and labels in
  • Load app while profiler is running

Note that the labels and buttons are rendering in the order of 2-3 seconds each!

Most other components are in the order of 10-20ms

Screenshot 2020-06-30 at 07 23 42

Screenshot 2020-06-30 at 07 24 12

return (
    <Row>
      <Col>
        <Form className="bg-light p-2">
          <Row>
            <FormColumnGroup>
              <Label htmlFor="startDistance">Target date</Label>
            </FormColumnGroup>
...
        <Button
            color="primary"
            className="text-light text-uppercase font-weight-bold"
            type="submit"
            disabled={!valid || error || submitting}
            onClick={(e) => {
              e.preventDefault();
              handleSubmit(userCriteria);
            }}
          >
            Create plan
          </Button>
        </Form>
      </Col>
    </Row>

Is this a known issue or am I doing something wrong?

Versions

  • Node/NPM: 12.16.3
  • OS: OS X 10.15.4
  • v4: 3.4.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions