google / tamperchrome

Tamper Dev is an extension that allows you to intercept and edit HTTP/HTTPS requests and responses as they happen without the need of a proxy. Works across all operating systems (including Chrome OS).
https://tamper.dev
Apache License 2.0
4.19k stars 219 forks source link

hex editor slows down tamper chrome #48

Closed sirdarckcat closed 3 years ago

sirdarckcat commented 3 years ago

when a request body is very large, the request editor slows down the ui significantly.

we should delay rendering the component until the user selects the hex editor tab, and perhaps limit the number of inputs generated to the ones visible on the web view.

sirdarckcat commented 3 years ago

https://material.angular.io/cdk/scrolling/overview

sirdarckcat commented 3 years ago

https://github.com/google/tamperchrome/commit/20d3870b1e91a3d9cab701d467604771977df563 makes this a lot faster, but it's still slow.

I tried to do virtual scroll https://github.com/google/tamperchrome/commit/3ab63005fa3884ba17294958a93b82540e8528bc but its still slow.

leaving it open

sirdarckcat commented 3 years ago

once the user selects the hex editor, the tab stays there for all requests, so it becomes slow. we should default to non-hex editor while its slow

sirdarckcat commented 3 years ago

some other ideas to make it faster:

sirdarckcat commented 3 years ago

One more idea is to render as text, and only when the user clicks or focuses it, transform a single char into input.

sirdarckcat commented 3 years ago

https://github.com/google/tamperchrome/commit/064105f072300ffe26f30ed0a6ccb5b60326637a is now constant regardless of the size of the body. this was achieved by making the input only render when selected (otherwise it is displayed as text), having a single scrolling element in a single virtual for loop.

it's still not super fast, though, but it's getting hard to make it faster now.