Skip to content

Optimize hoisted static content #2

Open

Description

@WebReflection

Based on this tweet, and its code example, "truly constant elements" are passed right away as children.

uhtml and friends have this Hole class concept, that would make it kinda easier to aggregate children as arrray, but there's no way to pass this check around and help other cases too, and currently, the logic doesn't aggregate "holes" in an efficient way, as empty text nodes are inserted in between.

This might not even be a real-world performance issue, but it's something to think about, either here or in the specialized transformer, if even possible with ease.

P.S. right now everything looks fine and working as expected

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

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions