Skip to content

Move property literals out of Plotly.restyle #648

Closed
@monfera

Description

@monfera
Contributor

See items 1, 2, 3 in #617 (comment).
Preceding comment from @etpinard: #617 (comment)

Activity

etpinard

etpinard commented on Jun 15, 2016

@etpinard
Contributor

I think (at least I like to think) that there's a way to achieve this using our attribute declaration.

Some questions that we need to answer:

  • Do we need all restyle docalc, doplot, ... distinctions ? Can you merge some of them?
  • Most docalc updates relate to our data_array and our arrayOk attributes. Meaning that we could simply use the attribute declaration to figure our what update path to take. Are there any exceptions to that rule?
  • anything else ?

And most importantly, much of restyle (and relayout) is un-tested. We should be very careful when making this change.

etpinard

etpinard commented on Apr 10, 2017

@etpinard
Contributor

From @rreusser 's #1578

Carpet is going to add a huge number of attrs to recalcAttrs. (up to 287 total or so!?) The array of attributes is recalculated on every plot and it looks them up with indexOf. It should place them in a hash (e.g. {mode: true, visible: true, ...}) and should be defined in a plot-api-global context since it never changes.

@alexcjohnson notes that a larger refactoring is desired, but this might be a start since, at least once carpet is merged, it shouldn't take more than five minutes and may very well be at the point of having a non-negligible impact on performance.

etpinard

etpinard commented on Sep 13, 2017

@etpinard
Contributor

#1999 will probably close this.

etpinard

etpinard commented on Oct 5, 2017

@etpinard
Contributor

Superseded by #2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

        Participants

        @monfera@etpinard

        Issue actions

          Move property literals out of Plotly.restyle · Issue #648 · plotly/plotly.js