Improve performance when using a non-admin user#1062
Open
whikloj wants to merge 5 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Link to Github issue or other discussion
#1061
What does this PR do?
Reduces multiple requests for field configuration data to a single request for an entity/bundle
What changes were made?
get_entity_fields()fromlisttodictwithfield_name: field_info,field_info == field_name(i.e.{"field_some": "field_some", "field_other": "field_other"})use_workbench_permissionfield_info = {'config': <field configuration>, 'storage_config': <field storage configuration>}get_field_definition()for each entity type to reduce the function.How to test / verify this PR?
Run a
--checkof any action with both an administrator user and a non-admin user. There should be no difference except for (hopefully) some improvement in speed.I am fixing some orphans and using a simple config like this
and a csv with just the
node_idof the object's to fix thefield_member_ofonRun as my user (administrator)
Run as workbench_user
Interested Parties
@mjordan
Checklist
I have not done this, but I could add some simple tests with pulled data from our development server.
setup.py?