inspectdev / inspect-issues

Issue tracker for Inspect
22 stars 2 forks source link

Screencasting: Selecting elements is very slow #127

Open hbinkle opened 2 years ago

hbinkle commented 2 years ago

Steps to Reproduce: Using select element ist very slow: image In most cases it's that slow that I can't used it. Then I need to click through the HTML tree manually.

auchenberg commented 2 years ago

@hbinkle Thanks for reporting this.

How are you selecting the dom elements? Visually on the device? Can you outline what specific steps you do and on which device?

hbinkle commented 2 years ago

@auchenberg, it seems to be related to size of the a project/javascript app. Here is an example project: https://codesandbox.io/s/react-typescript-dxtable-zclcr

  1. open https://codesandbox.io/embed/react-typescript-dxtable-zclcr?codemirror=1
  2. in the "source code" scroll down e.g. to line 161 image --> - then when hovering over the "source code" elements (e.g. the IconButton) in the preview you already notice that it's very slow and the elements view on the right does no longer scroll the hovered item into view. With our real project (not in a codeSandbox) we have the same behavior.
auchenberg commented 2 years ago

@hbinkle Thanks, so to confirm. The issue is when you are using the screencasting functionality, that you experience a slow refresh rate that makes it hard to use the "select element" functionality?

hbinkle commented 2 years ago

@auchenberg yes of course, how should I use the "select element" function without the screencast?

auchenberg commented 2 years ago

You can use the touch screen on your device. Our screencasting is currently in the experimental stage due to limited APIs from Apple, https://inspect.dev/changelog/v0.6.9-experimental-screencasting.

Until we get better APIs there's sadly not much we can do.

hbinkle commented 2 years ago

I see, but using the touch screen on the phone doesn't work at all.

  1. Open that app: https://zclcr.csb.app/
  2. trigger the "select element" button
  3. select e.g. "South America" on the phone --> you can see the "select element" button is disabled again, the scrollbar in the elements view does once pull out but it does not scroll to any location or select an other element than the default selected body tag.
hbinkle commented 2 years ago

btw, the performance when hovering over elements in the screencast is pretty much better when using the remotedebug_ios_webkit_adapter proxy and chrome device/inspect. But the proxy crashes when clicking/selecting on an item.

auchenberg commented 2 years ago

@hbinkle Very interesting, it's a very similar implementation, so I wonder if the rendering performance difference you see is due to Electron...