Re: speed of method applyFilters in qx.ui.table.model.Filtered

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: speed of method applyFilters in qx.ui.table.model.Filtered

asaris
Hugh,

I hadn't much time to look at it, but I made spike solution for class Filtered.

Method applyFiltersQuickly behaves differently from qx method applyFilters. My class by default creates two instances of data - full _fullArr and filtered _rowArr. applyFiltersQuickly doesn't dispatch any events, only one event "dataChanged" is dispatched by setData inside applyFiltersQuickly.

That's all I need. Speed is perfect.

asaris

Hugh Gibson wrote:
Asaris,

How did you get on?

I still think it's worth raising a bug about this as the framework could
be much improved.

Hugh

  
*Subject:* Re: [qooxdoo-devel] speed of method applyFilters 
in	qx.ui.table.model.Filtered
*From:* asaris [hidden email]
*To:* qooxdoo Development [hidden email]
*Date:* Thu, 05 Jun 2008 14:04:22 +0100

This is what I plan finalize tomorrow. To add alternative to 
applyFilters() method to Filtered class. In most cases (99.99..%) I 
wouldn't care about events for single row.

Filter row data _fullArr to filtered row data filteredArr,  set 
_filteredArr to model setData(filteredArr).

I need to filter only tables in size max 20cols x 500rows. I made 
custom applyFilters yesterday on row data, has some bugs, but runs 
rocketfast.

asaris

Hugh Gibson wrote:
    
I have data sets of 20 columns and 50-150 rows. Model is used by 
Table. And 1 regex filter, that filters out 50%+ of rows. 
Unfortunately it's too slow. It takes 5-10+ seconds to filter 
        
when >> calling applyFilters(). I have no event listeners. My quick 
    
benchmark shows that hideRows() slows down process.
    
        
Not surprising, looking at hideRows which shifts the whole data 
set along
and causes all sorts of events via Simple.removeRows.

It should be possible to make this a lot faster by rewriting 
applyFilters
to set up a filter of rows to be deleted first then doing them 
all at
once.

A couple of simple optimisations would be to run through the rows
backwards (so you're not moving rows around that are going to be 
deleted
later) and actually using the row count facility of hideRows.

It's worth you raising an issue about this. Add a note that the
applyFilters method should really be calling a method to actual 
apply the
filter to one row, making it easier to implement custom filters 
and also
make it easier to actually delete the rows in different ways.

Hugh
      

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

  

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Filtered.js (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: speed of method applyFilters in qx.ui.table.model.Filtered

Hugh Gibson-2
>
> I hadn't much time to look at it, but I made spike solution for
> class Filtered.
>
> Method applyFiltersQuickly behaves differently from qx method
> applyFilters. My class by default creates two instances of data -
> full _fullArr and filtered _rowArr. applyFiltersQuickly doesn't
> dispatch any events, only one event "dataChanged" is dispatched by
> setData inside applyFiltersQuickly.
>
> That's all I need. Speed is perfect.

I logged a bug at http://bugzilla.qooxdoo.org/show_bug.cgi?id=999

Could you upload your applyFiltersQuickly code so there's something to
start work from?

Hugh

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: speed of method applyFilters in qx.ui.table.model.Filtered

asaris-2
Sounds like you didn't notice attachment in my response email. My
response email had attachment Filtered.js

I added this file to bug.

asaris

Hugh Gibson wrote:

>> I hadn't much time to look at it, but I made spike solution for
>> class Filtered.
>>
>> Method applyFiltersQuickly behaves differently from qx method
>> applyFilters. My class by default creates two instances of data -
>> full _fullArr and filtered _rowArr. applyFiltersQuickly doesn't
>> dispatch any events, only one event "dataChanged" is dispatched by
>> setData inside applyFiltersQuickly.
>>
>> That's all I need. Speed is perfect.
>>    
>
> I logged a bug at http://bugzilla.qooxdoo.org/show_bug.cgi?id=999
>
> Could you upload your applyFiltersQuickly code so there's something to
> start work from?
>
> Hugh
>
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php
> _______________________________________________
> qooxdoo-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
>  


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: speed of method applyFilters in qx.ui.table.model.Filtered

Hugh Gibson-2
> Sounds like you didn't notice attachment in my response email. My
> response email had attachment Filtered.js
>
> I added this file to bug.

Asaris,

Thanks, I saw the file on the bug report. That will be a good place to
start from.

Hugh

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel