Discussion:
wxGrid is slower for large data
Mahmoud Eltahawy
2014-04-06 13:49:09 UTC
Permalink
Hi All,
I am developing an application which acts as a server for tracing data from
a client, it does the following:

- It receives the data continuously from the client over the socket
- Inside the socket notification event, I process the data and display
it to the grid(n rows x 7 columns),
- I append new rows to the gird for each new data

It works fine, but I see slowness when the grid becomes larger. so I am
just wondering for the best way to overcome this issue in slowness? I am
thinking to push the incoming data inside the socket event to a queue and
try to implement a worker thread which runs consonantly and pop the data
from the queue and then add it to grid?


Thanks
Mahmoud
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Jan Engelhardt
2014-04-06 14:02:05 UTC
Permalink
Hi All,I am developing an application which acts as a server for tracing
* It receives the data continuously from the client over the socket
* Inside the socket notification event, I process the data and display it
to the grid(n rows x 7 columns),
* I append new rows to the gird for each new data
It works fine, but I see slowness when the grid becomes larger. so I am just
wondering for the best way to overcome this issue in slowness?
If you feel wxGrid draws too slowly, you may be able to use a
wxListCtrl/wxListView in (wxLC_REPORT|wxLC_VIRTUAL) mode instead if you
do not have too fancy requirements.
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Stewart Douglas
2014-04-06 14:10:47 UTC
Permalink
You can do the same thing with the wxGrid - I've used it with a large
number of rows with no performance issues.Use wxGridTableBase and
wxGridCellAttrProvider.
Post by Jan Engelhardt
Hi All,I am developing an application which acts as a server for tracing
* It receives the data continuously from the client over the socket
* Inside the socket notification event, I process the data and display it
to the grid(n rows x 7 columns),
* I append new rows to the gird for each new data
It works fine, but I see slowness when the grid becomes larger. so I am just
wondering for the best way to overcome this issue in slowness?
If you feel wxGrid draws too slowly, you may be able to use a
wxListCtrl/wxListView in (wxLC_REPORT|wxLC_VIRTUAL) mode instead if you
do not have too fancy requirements.
--
Stewart Douglas
***@snowgold.com
http://www.snowgold.com
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Mahmoud Eltahawy
2014-04-06 14:16:26 UTC
Permalink
Please, what do you mean with "same thing"? do you mean the cash concept
of wxListView ?
Post by Stewart Douglas
You can do the same thing with the wxGrid - I've used it with a large
number of rows with no performance issues.Use wxGridTableBase and
wxGridCellAttrProvider.
Hi All,I am developing an application which acts as a server for tracing
* It receives the data continuously from the client over the socket
* Inside the socket notification event, I process the data and display it
to the grid(n rows x 7 columns),
* I append new rows to the gird for each new data
It works fine, but I see slowness when the grid becomes larger. so I am just
wondering for the best way to overcome this issue in slowness?
If you feel wxGrid draws too slowly, you may be able to use a
wxListCtrl/wxListView in (wxLC_REPORT|wxLC_VIRTUAL) mode instead if you
do not have too fancy requirements.
--
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Stewart Douglas
2014-04-06 14:21:11 UTC
Permalink
Hi Mahmoud, I mean running the wxGrid in a virtual mode, so it actually
calls you back to get the contents of each cell when they need to be
drawn, so you are keeping your data in your own business objects, and
the grid control asks you for the data as it is required. Rather than
you populating the grid with the data directly.

Hope this helps - http://wiki.wxwidgets.org/WxGridTableBase

Stew
Post by Mahmoud Eltahawy
Please, what do you mean with "same thing"? do you mean the cash
concept of wxListView ?
You can do the same thing with the wxGrid - I've used it with a
large number of rows with no performance issues.Use
wxGridTableBase and wxGridCellAttrProvider.
Post by Jan Engelhardt
Hi All,I am developing an application which acts as a server for tracing
* It receives the data continuously from the client over the socket
* Inside the socket notification event, I process the data and display it
to the grid(n rows x 7 columns),
* I append new rows to the gird for each new data
It works fine, but I see slowness when the grid becomes larger. so I am just
wondering for the best way to overcome this issue in slowness?
If you feel wxGrid draws too slowly, you may be able to use a
wxListCtrl/wxListView in (wxLC_REPORT|wxLC_VIRTUAL) mode instead if you
do not have too fancy requirements.
--
Stewart Douglas
http://www.snowgold.com
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.
or visit http://groups.google.com/group/wx-users
--
Stewart Douglas
***@snowgold.com
http://www.snowgold.com
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Mahmoud Eltahawy
2014-04-06 15:15:47 UTC
Permalink
Hi Stew,
Thanks for your help, I used the wxGridStringTable, and it is faster now
Regards
Mahmoud
Post by Stewart Douglas
Hi Mahmoud, I mean running the wxGrid in a virtual mode, so it actually
calls you back to get the contents of each cell when they need to be drawn,
so you are keeping your data in your own business objects, and the grid
control asks you for the data as it is required. Rather than you populating
the grid with the data directly.
Hope this helps - http://wiki.wxwidgets.org/WxGridTableBase
Stew
Please, what do you mean with "same thing"? do you mean the cash concept
of wxListView ?
Post by Stewart Douglas
You can do the same thing with the wxGrid - I've used it with a large
number of rows with no performance issues.Use wxGridTableBase and
wxGridCellAttrProvider.
Hi All,I am developing an application which acts as a server for tracing
* It receives the data continuously from the client over the socket
* Inside the socket notification event, I process the data and display it
to the grid(n rows x 7 columns),
* I append new rows to the gird for each new data
It works fine, but I see slowness when the grid becomes larger. so I am just
wondering for the best way to overcome this issue in slowness?
If you feel wxGrid draws too slowly, you may be able to use a
wxListCtrl/wxListView in (wxLC_REPORT|wxLC_VIRTUAL) mode instead if you
do not have too fancy requirements.
--
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.
or visit http://groups.google.com/group/wx-users
--
--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+***@googlegroups.com
or visit http://groups.google.com/group/wx-users
Loading...