Problem/Motivation

This is an enhancement of the code committed here: #2413877: Enhance Field Validation integration using remote validation
The current code uses system_rebuild_module_data() to ensure all dependencies required to run the validations on an ajax call performed using the JS module are registered.
The problem with system_rebuild_module_data() is that it does to much - it wants to write the updated data while the validation simply is interested in getting the data and that as fast as possible.
Another side-effect of writing the data is that this can cause a db lock, with clientside_validation available in the frontend and thus with a ton of ajax call this can lead to db lock timeouts and such nice things.

Proposed resolution

Get rid of system_rebuild_module_data() and replace it with our own handling that just takes care of reading and organizing dependencies.

The approach in the patch created in my tests the same dependency list as the previous solution - however I'm not yet sure about the ordering or if this is relevant at all.

I'm not sure about the performance, I'd say it's a bit faster. But I'm sure it doesn't write :)

Remaining tasks

Reviews needed.

User interface changes

None.

API changes

None.

Data model changes

None.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

das-peter created an issue.