Skip to content

Performance issue with VSBuffer#slice #76076

Closed

Description

In the web companion we have seen performance issues with VSBuffer#slice. We have added VSBuffer as an abstraction between node's Buffer and browser typed arrays. VSBuffer's slice simply calls this.buffer.slice, e.g Buffer#slice or TypedArray#slice. The latter is a shallow copy, the former isn't. That explains bad performance on the web, I believe we should be using subarray instead: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/subarray

Activity

  1. added
    bug
    freeze-slow-crash-leak
    on Jun 25, 2019
  2. jrieken commented on Jun 25, 2019

    @jrieken
    ContributorAuthor

    This is getting much, much better when using subarray

  3. added
    verified
    on Jun 26, 2019
  4. locked and limited conversation to collaborators on Aug 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugfreeze-slow-crash-leakverified

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions