Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance is not great when using a very large list - 10k+ items #61

Open
kastravec opened this issue Mar 30, 2019 · 2 comments
Open

Comments

@kastravec
Copy link

When using it on a large model, let's say starting from 10k items and more then the performance is not great. If the number of items is larger then 20k then the problem becomes significantly noticeable.

SortFilterProxyModel {
    id: proxyModel

    filters: AnyOf {
        RegExpFilter {
            roleName: "role1"
            pattern: searchInput
            caseSensitivity: Qt.CaseInsensitive
        }
        RegExpFilter {
            roleName: "role2"
            pattern: searchInput
            caseSensitivity: Qt.CaseInsensitive
        }
    }
    sorters: RoleSorter {
        roleName: "role2"
        sortOrder: Qt.AscendingOrder
    }
}

Above is a snippet of how I'm using it.
Great work and API overall.

Cheers,
Petref

@kastravec
Copy link
Author

kastravec commented Mar 30, 2019

This is the complete code.

SortFilterProxyModel {
        id: proxyModel
        sourceModel: IEXSymbolsModel
        filters: [ AnyOf {
                RegExpFilter {
                    roleName: "role1"
                    pattern: searchInputLabel.text
                    caseSensitivity: Qt.CaseInsensitive
                }

                RegExpFilter {
                    roleName: "role2"
                    pattern: searchInputLabel.text
                    caseSensitivity: Qt.CaseInsensitive
                }
            },

            ValueFilter {
                enabled: checkbox0.checked
                roleName: "role3"
                value: 1
            },

            ValueFilter {
                enabled: checkbox1.checked
                roleName: "role3"
                value: 2
            },

            ValueFilter {
                enabled: checkbox2.checked
                roleName: "role3"
                value: 3
            },

            ValueFilter {
                enabled: checkbox3.checked
                roleName: "role3"
                value: 4
            },

            ValueFilter {
                enabled: checkbox4.checked
                roleName: "role4"
                value: 5
            }
        ]
    }

@oKcerG
Copy link
Owner

oKcerG commented Jun 4, 2019

Hello,
What performance is not great? Are we only talking about filtering the data when a filter changes?

Can you try if 770789e improve your situation?

Do multiple filters change at once in your use case or are they only changed one by one in the ui?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants