We are working on a new fairly large EE site built in 1.7. We have roughly 250 weblogs, and over 30 user groups managed by Publish Plus. We’ve run into some issues with the memory of the setting column for extensions. We seem to have fixed the issue by changing the column from TEXT to LONGTEXT. We had one of our developers, who normally doesn’t work with EE, look into the problem to see if there was a way to accommodate the site as it continues to grow so we don’t run into these issues. He let us know that the problem doesn’t stem from the individual extensions, but how extensions are handled by EE in general. This is what he wrote back:
“I looked through the code and it seems as if the getting and setting of settings are done in one place. Everything is loaded into memory at once and saved at once. Thus, there are no hooks to optimize this process. EE simply asks an extension to get its data in two places: (1) when the extension is first loaded and (2) after the Settings Form is saved. Also, it only saves settings in one place: when the Settings Form is saved. Thus, the time it takes to read the data from and write the data to the database isn’t as important since it’s done very infrequently. However, this is not a very good design. Since all of the settings are loaded at once (and never unloaded while the extension is running) they are in memory at all times. You can imagine that a lot of settings spread over dozens of installed extensions will lead to some memory issues on the server. I doubt your application will become large enough that you won’t be able to increase the memory to accommodate this (and you may not even need to do that) but this is a terrible design for scalability and another example of how EE wasn’t written for large enterprise applications. There is no way to change this for an extension, as you don’t have control over when the code to get and save extension settings is called. That is all done by internal EE extension handling code.
So in short, leave it as it is because there’s no other choice in EE.”
I’m wondering if how the settings are saved has changed in EE 2.0 for better optimization for larger sites? Or is this true that EE truly isn’t able to handle large scale enterprise sites?