# ETO gridview slow on windows

**URL:** <https://discourse.mcneel.com/t/eto-gridview-slow-on-windows/135776>\
**Category:** Rhino Developer\
**Tags:** windows, mac, python\
**Created:** [January 3, 2022, 7:14pm UTC](https://discourse.mcneel.com/t/eto-gridview-slow-on-windows/135776 "2022-01-03T19:14:30Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gijs](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/gijs/32/769882_2.png) [@Gijs](https://discourse.mcneel.com/u/Gijs)\
**Post date:** [January 3, 2022, 7:14pm UTC](https://discourse.mcneel.com/t/eto-gridview-slow-on-windows/135776/1 "2022-01-03T19:14:30Z")

</div>

In [this tool](https://discourse.mcneel.com/t/global-edge-continuity-looking-for-beta-testers/135551) I’m developing I am using an ETO GriedView to display data.

The tool uses a form (ETO.Forms.Dialog) , modeless by setting it to Rhino.UI.RhinoEtoApp.MainWindow if that matters.  
The table work well, is sortable, but feels very slow, with just a couple of columns and about 200 rows. I compared the same tool on a macbook (i9) and it’s much, much faster there. Is there anything I need to be aware of to get the table to behave fluently on Windows as well?  
If I switch from just a few rows to about 200 it takes more than 2 seconds to refresh. If needed I can share the script in pm.

---

<div class="post-metadata">

**Author:** ![clement](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/clement/32/759176_2.png) [@clement](https://discourse.mcneel.com/u/clement)\
**Post date:** [January 5, 2022, 5:05am UTC](https://discourse.mcneel.com/t/eto-gridview-slow-on-windows/135776/2 "2022-01-05T05:05:13Z")

</div>

Hi @Gijs,

how do you draw the alternating row colors ? Does it get faster without ?

\_  
c.

---

<div class="post-metadata">

**Author:** ![Gijs](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/gijs/32/769882_2.png) [@Gijs](https://discourse.mcneel.com/u/Gijs)\
**Post date:** [January 5, 2022, 8:36am UTC](https://discourse.mcneel.com/t/eto-gridview-slow-on-windows/135776/3 "2022-01-05T08:36:21Z")

</div>

hi @clement thanks for having a look. I disabled it but it makes no difference. In fact I measured the execution time of the code that runs to refresh the list and it takes \<0.1 seconds but then it still takes a while for the list to refresh. Here’s a screen recording showing the behavior:

[https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/f/1/e/f1e34f4f96e2e29095c0e3d1f083f37c2848be6d.mp4](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/f/1/e/f1e34f4f96e2e29095c0e3d1f083f37c2848be6d.mp4)

---

<div class="post-metadata">

**Author:** ![Gijs](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/gijs/32/769882_2.png) [@Gijs](https://discourse.mcneel.com/u/Gijs)\
**Post date:** [January 5, 2022, 8:50am UTC](https://discourse.mcneel.com/t/eto-gridview-slow-on-windows/135776/4 "2022-01-05T08:50:47Z")

</div>

see how much faster it is on the Mac:

[https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/e/8/5/e85090cadfb084920e6332ede2352d4d4d44275c.mov](https://global.discourse-cdn.com/mcneel/uploads/default/original/4X/e/8/5/e85090cadfb084920e6332ede2352d4d4d44275c.mov)

---

<div class="post-metadata">

**Author:** ![mlukasz87](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/mlukasz87/32/771517_2.png) [@mlukasz87](https://discourse.mcneel.com/u/mlukasz87)\
**Post date:** [January 5, 2022, 12:40pm UTC](https://discourse.mcneel.com/t/eto-gridview-slow-on-windows/135776/5 "2022-01-05T12:40:04Z")

</div>

Maybe @curtisw could help here.

---

<div class="post-metadata">

**Author:** ![kitjmv](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/kitjmv/32/769169_2.png) [@kitjmv](https://discourse.mcneel.com/u/kitjmv)\
**Post date:** [January 5, 2022, 12:45pm UTC](https://discourse.mcneel.com/t/eto-gridview-slow-on-windows/135776/6 "2022-01-05T12:45:09Z")

</div>

Maybe this topic can help you …

> [@TreeGridView scroll performance](https://discourse.mcneel.com/t/treegridview-scroll-performance/112718):
>
> Hello, I have a TreeGrid with over 600,000 items. At startup, scrolling performance is good, but when I add a subitem the performance decreases depending on the location of the parent item. Anyone know why and how I can fix this? Note: In this GIF, only parent items are loaded and children are loaded on demand when the parent is expanded Before asking this question, I suspected my code, after a scan of the application, 95% of the processors it uses by “native code” and I don’t know if this…

---

<div class="post-metadata">

**Author:** ![Gijs](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/gijs/32/769882_2.png) [@Gijs](https://discourse.mcneel.com/u/Gijs)\
**Post date:** [January 5, 2022, 1:14pm UTC](https://discourse.mcneel.com/t/eto-gridview-slow-on-windows/135776/7 "2022-01-05T13:14:18Z")

</div>

@kitjmv thanks but I don’t see in that thread a pointer for a solution?  
I might be able to truncate the data and speed it up this way. But still 200 items isn’t that many.

@curtisw I noticed while testing on the Mac that the scrollbars don’t work well, I had to scale the window to make them show up, and after clicking outside, they disappear and only reactivate once I scale the window again.

---

<div class="post-metadata">

**Author:** ![kitjmv](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/kitjmv/32/769169_2.png) [@kitjmv](https://discourse.mcneel.com/u/kitjmv)\
**Post date:** [January 5, 2022, 1:29pm UTC](https://discourse.mcneel.com/t/eto-gridview-slow-on-windows/135776/8 "2022-01-05T13:29:58Z")

</div>

Yes me neither 🙂 except that there are some side effects with using WPF in ETO.  
In my case if a row was selected the scrolling was horrible.

In your case.  
When starting the application (if the “All” option is selected by default) does the display appear quickly ?  
If so, your issue is resolved like mine, find the setting (or settingS) to “reset” before making any changes to the list.

---

<div class="post-metadata">

**Author:** ![Gijs](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/gijs/32/769882_2.png) [@Gijs](https://discourse.mcneel.com/u/Gijs)\
**Post date:** [January 5, 2022, 2:10pm UTC](https://discourse.mcneel.com/t/eto-gridview-slow-on-windows/135776/9 "2022-01-05T14:10:36Z")

</div>

> [@kitjmv](#):
>
> When starting the application (if the “All” option is selected by default) does the display appear quickly ?

no, it makes no difference, the slowness is linear with the amount of items I’m surprised though that you can display 600.000 items

---

<div class="post-metadata">

**Author:** ![kitjmv](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/kitjmv/32/769169_2.png) [@kitjmv](https://discourse.mcneel.com/u/kitjmv)\
**Post date:** [January 5, 2022, 2:14pm UTC](https://discourse.mcneel.com/t/eto-gridview-slow-on-windows/135776/10 "2022-01-05T14:14:42Z")

</div>

> [@Gijs](#):
>
> I’m surprised though that you can display 600.000 items

you can test with a very bad and old code source:

> **[GitHub - corbane/Libx.Blender: Blend File Viewer As Is](https://github.com/corbane/Libx.Blender)**
>
> Blend File Viewer As Is

---

<div class="post-metadata">

**Author:** ![Gijs](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/gijs/32/769882_2.png) [@Gijs](https://discourse.mcneel.com/u/Gijs)\
**Post date:** [January 5, 2022, 2:43pm UTC](https://discourse.mcneel.com/t/eto-gridview-slow-on-windows/135776/11 "2022-01-05T14:43:59Z")

</div>

I cloned your repository but it says it was missing stuff…:

> Libx.Blender.Viewer\Libx.Blender.Viewer.csproj : error : Project file is incomplete. Expected imports are missing.

---

<div class="post-metadata">

**Author:** ![clement](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/clement/32/759176_2.png) [@clement](https://discourse.mcneel.com/u/clement)\
**Post date:** [January 5, 2022, 2:44pm UTC](https://discourse.mcneel.com/t/eto-gridview-slow-on-windows/135776/12 "2022-01-05T14:44:19Z")

</div>

> [@Gijs](#):
>
> execution time of the code that runs to refresh the list and it takes \<0.1 seconds but then it still takes a while for the list to refresh.

I see, let’s wait for response from @curtisw.

\_  
c.

---

<div class="post-metadata">

**Author:** ![dale](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/dale/32/685184_2.png) [@dale](https://discourse.mcneel.com/u/dale)\
**Post date:** [January 5, 2022, 4:32pm UTC](https://discourse.mcneel.com/t/eto-gridview-slow-on-windows/135776/13 "2022-01-05T16:32:29Z")

</div>

@Gijs - do you have a sample, that we can run here, that demonstrates the ‘slowness’?

Thanks,

– Dale

---

<div class="post-metadata">

**Author:** ![Gijs](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/gijs/32/769882_2.png) [@Gijs](https://discourse.mcneel.com/u/Gijs)\
**Post date:** [January 5, 2022, 5:52pm UTC](https://discourse.mcneel.com/t/eto-gridview-slow-on-windows/135776/14 "2022-01-05T17:52:51Z")

</div>

@dale, see attached example (400 rows) is already unworkable here:  
[test\_dialog.py](https://discourse.mcneel.com/uploads/short-url/wJ2AOKRU61FjyguN9Pps8SBeDqD.py) (4.2 KB)

---

<div class="post-metadata">

**Author:** ![dale](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/dale/32/685184_2.png) [@dale](https://discourse.mcneel.com/u/dale)\
**Post date:** [January 5, 2022, 5:55pm UTC](https://discourse.mcneel.com/t/eto-gridview-slow-on-windows/135776/15 "2022-01-05T17:55:14Z")

</div>

Thanks @Gijs, I’m looking at this.

– D

---

<div class="post-metadata">

**Author:** ![clement](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/clement/32/759176_2.png) [@clement](https://discourse.mcneel.com/u/clement)\
**Post date:** [January 5, 2022, 7:10pm UTC](https://discourse.mcneel.com/t/eto-gridview-slow-on-windows/135776/16 "2022-01-05T19:10:44Z")

</div>

Hi @Gijs, this line is causing the slowdown:

```python
#layout.BeginScrollable(forms.BorderType.None, drawing.Padding(0), drawing.Size(15,5))

```

once i commented it out, it loads and sorts much faster, tested on windows. Did you add this for mac ?  
\_  
c.

---

<div class="post-metadata">

**Author:** ![Gijs](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/gijs/32/769882_2.png) [@Gijs](https://discourse.mcneel.com/u/Gijs)\
**Post date:** [January 5, 2022, 7:34pm UTC](https://discourse.mcneel.com/t/eto-gridview-slow-on-windows/135776/17 "2022-01-05T19:34:24Z")

</div>

good find! 🙂

That’s a huge difference, thanks. What I noticed though is that with the BeginScrollable the scrolling is more fluent than without, do you see that too?

---

<div class="post-metadata">

**Author:** ![Gijs](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/gijs/32/769882_2.png) [@Gijs](https://discourse.mcneel.com/u/Gijs)\
**Post date:** [January 5, 2022, 7:37pm UTC](https://discourse.mcneel.com/t/eto-gridview-slow-on-windows/135776/18 "2022-01-05T19:37:30Z")

</div>

@clement but there’s a catch: if I disable it in my tool, the grid will not be scrollable, since I only want the grid to be scrollable and the rest to stay in place.

---

<div class="post-metadata">

**Author:** ![clement](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/clement/32/759176_2.png) [@clement](https://discourse.mcneel.com/u/clement)\
**Post date:** [January 5, 2022, 7:43pm UTC](https://discourse.mcneel.com/t/eto-gridview-slow-on-windows/135776/19 "2022-01-05T19:43:54Z")

</div>

> [@Gijs](#):
>
> do you see that too?

Yes, same here… still poking around. `EndScrollable()` is missing btw. but that’s not causing the slowdown.

> [@Gijs](#):
>
> if I disable it in my tool, the grid will not be scrollable, since I only want the grid to be scrollable and the rest to stay in place.

Yeah, this is of course different in this example where the grid fills the whole dialog, it automatically adds the scrollbars without the `Scrollable`. I’ve first tried to make only a `forms.Scrollable()` and then set the grid to it’s `Content`, then add it to the layout, but this also causes the slowdown…

\_  
c.

---

<div class="post-metadata">

**Author:** ![Gijs](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/gijs/32/769882_2.png) [@Gijs](https://discourse.mcneel.com/u/Gijs)\
**Post date:** [January 5, 2022, 7:47pm UTC](https://discourse.mcneel.com/t/eto-gridview-slow-on-windows/135776/20 "2022-01-05T19:47:53Z")

</div>

strangely enough, in my tool, removing the scrollable does not help… 🤦‍♂️

[Next page](https://discourse.mcneel.com/t/eto-gridview-slow-on-windows/135776.md?page=2)
