Code Monkey home page Code Monkey logo

Comments (5)

rebornix avatar rebornix commented on May 25, 2024 1

I think we should at least add some gpu optimization to the rendering.

I took it back, the root cause is forced reflow -->

image

private populateHexAdresses(rowData: VirtualizedPacket[]): void {
        const hex_addr = document.getElementById("hexaddr");
        const offset = rowData[0].offset;
        const addr = document.createElement("div");
        addr.className = "row";
        addr.setAttribute("data-offset", offset.toString());
        addr.innerText = pad(offset.toString(16), 8).toUpperCase();
        hex_addr!.appendChild(addr);
        this.rows[0].set(offset.toString(), addr);
        // We add a left px offset to effectively right align the column
        addr.style.left = `${addr.parentElement!.clientWidth - addr.clientWidth}px`;
        this.translateRow(addr, offset);
    }

Suggestions:

  • hold a reference to hexaddr DOM node
  • cache its width
  • listen to window size change and then update the cache (and also rerender the viewport if necessary)

I think this will remove most force reflow and reduce this issue by a ton.

from vscode-hexeditor.

lramos15 avatar lramos15 commented on May 25, 2024

This was discussed briefly and I think it was just stated that it was too intertwined with the core of VS to easily utilize in the hex editor. I would be happy to discuss it more with you if you have any further knowledge about how that could easily be done, I would be happy to discuss it as my implementation does do some basic chunk rendering which does have a decent buffer outside the viewport.

from vscode-hexeditor.

joaomoreno avatar joaomoreno commented on May 25, 2024

We'd have to weed it out but it is feasible! We even have paging capabilities which simply calls for pages to load, as the list scrolls up and down.

from vscode-hexeditor.

rebornix avatar rebornix commented on May 25, 2024

recording

I'm seeing a lot of blank frames when scrolling even though the file is relatively small (2k loc), which makes navigating in the document really hard.

If adopting list view is hard, I think we should at least add some gpu optimization to the rendering.

from vscode-hexeditor.

connor4312 avatar connor4312 commented on May 25, 2024

We're now virtual

from vscode-hexeditor.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.