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

[API/feature?] Cache feature ids for each symbol in the QgsVectorLayer #31061

Merged
merged 3 commits into from
Aug 31, 2019

Conversation

roya0045
Copy link
Contributor

@roya0045 roya0045 commented Aug 2, 2019

Description

This is a proposal to cache the feature ids in the vector layer, similar to what is currently done with the counts.

The method to the the Fids is an extra in case someone would need it eventually.

This replaces the PR #30950 where it was proposed to use the counter directly but was discarded due to thread safety issues as highlighted by @nyalldawson

The need to have the fids comes from the symbology expression PRs where I need to provide the fids of the features to the expression and I need to store and access this list of fids from somewhere when the aggregate function is evaluated.

Any feedback is appreciated

Checklist

  • Commit messages are descriptive and explain the rationale for changes
  • Commits which fix bugs include fixes #11111 in the commit message next to the description
  • Commits which add new features are tagged with [FEATURE] in the commit message
  • Commits which change the UI or existing user workflows are tagged with [needs-docs] in the commit message and contain sufficient information in the commit message to be documented
  • I have read the QGIS Coding Standards and this PR complies with them
  • This PR passes all existing unit tests (test results will be reported by travis-ci after opening this PR)
  • New unit tests have been added for core changes
  • I have run the scripts/prepare-commit.sh script before each commit

@roya0045
Copy link
Contributor Author

roya0045 commented Aug 5, 2019

@nyalldawson Your opinion would be appreciated on the subject.

Is this caching fine with you and does the function clutter the QgsVectorLayer APi too much or is this tolerable?

@roya0045
Copy link
Contributor Author

@m-kuhn are you ok with this or do you still want to see what others have to say?

@stale stale bot added the stale Uh oh! Seems this work is abandoned, and the PR is about to close. label Aug 24, 2019
@roya0045
Copy link
Contributor Author

@m-kuhn @nyalldawson any opinion on this proposal?

@stale stale bot removed the stale Uh oh! Seems this work is abandoned, and the PR is about to close. label Aug 25, 2019
@3nids 3nids added the Squash! Remember to squash this PR, instead of merging or rebasing label Aug 28, 2019
@qgis qgis deleted a comment from stale bot Aug 28, 2019
@roya0045
Copy link
Contributor Author

@3nids PR has been rebased and squashed

@roya0045 roya0045 reopened this Aug 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Squash! Remember to squash this PR, instead of merging or rebasing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants