Skip to content
This repository was archived by the owner on Aug 15, 2019. It is now read-only.
This repository was archived by the owner on Aug 15, 2019. It is now read-only.

perf improvements #1

@ehynds

Description

@ehynds

Hi, there are a couple of things you could do to improve performance of this script:

  1. Don't store state as a class on the body. Hitting the DOM is expensive. Just store it in a variable, unless of course you want to expose each state to CSS.
  2. Cache your jQuery selectors outside of the setInterval and for loops.

<3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions