I have a large amount of data, one type of content has over 80k nodes and is a node reference for other content types. When conditional fields is enabled is pulls in all of that data and runs the system out of memory (over 1G at times) when trying to modify field settings or even add a new field. As soon as I disable conditional fields the memory issue clears up.

The off-the-top-of-my-head solution would be to use ajax to load the conditional fields on the fly if they're required. No need to load all that data if it's not being used, and no need to load every field if it's not being used.

Members fund testing for the Drupal project. Drupal Association Learn more


jean-baptiste’s picture

Version: 6.x-2.0-beta2 » 6.x-2.0
Status: Active » Needs review
616 bytes

The attached patch excludes Node reference fields.
With a few thousands nodes, the page was simply not loading because of the invocation of hook_allowed_values, which produces drop-down lists containing thousands of elements.

mwz’s picture

I ran into the same issue as beck24 and your patch helped immensely.

The site I am working on needed to be able to exclude node references for certain content types and allow it for others.

The attached patch expands on your code, allowing each content type control over whether it will allow or disallow node references.

I wasn't sure how to attribute the block of code from your patch, so I explained it's origin in a comment. Not sure if that was correct.

peterpoe’s picture

Issue summary: View changes
Status: Needs review » Closed (outdated)