Skip to content

We should only call DropDownDiv.hideWithoutAnimation when the dropDown div is visible #549

Closed
@picklesrus

Description

@picklesrus

We should figure out why DropDownDiv.hideWithoutAnimation and clearContent are called on all mouse/touch move events during a workspace drag. If the div isn't present, we should be able to skip this step and, while it doesn't cost a ton on desktop, it is taking taking a few milliseconds of each frame on a MotoX, and between .5 and 1ms on a nexus5 and a nexus9.

Here's the trace of the call from chrome's timeline view:
Blockly.onMouseMove_:blockly.js:245
Blockly.WorkspaceSvg.scroll: workspace_svg.js:1397
Blockly.DropDownDiv.hideWithoutAnimation: dropdowndiv.js:372
Blockly.DropDownDiv.clearContent:dropdowndiv.js:152

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions