Hi.I used wxgrid to to develop a sql tool.But i found that when i select a large number of data insert a grid,it's not effective.
1.I select * from a table from database.The result contain 1000 rows and 51 column.The sql execution takes 0.00 second.
2.Insert all data to the grid.It takes about 0.80 second.
3.But after that i call grid->AutoSizeColumns(). It takes about 3.54 second!!!!
How to make my program running fast?
How to make wxgrid::AutoSizeColumns more effective? Topic is solved
Re: How to make wxgrid::AutoSizeColumns more effective?
Sounds normal. This function needs to call wxDC::GetTextExtent() for every single cell, that takes its time.
Are you using a release build with compiler optimizations already? If not, that could make a huge difference.
Are you using a release build with compiler optimizations already? If not, that could make a huge difference.
Use the source, Luke!
Re: How to make wxgrid::AutoSizeColumns more effective?
Oh,I tried the release build ,it just takes 0.50 sec!It's so fast!Thank you,doulbemax.