Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 26042

Hello Last night I build a wordpress site and when I’m saving my settings using theme options it take long time and then gives and error message Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 2604243 bytes)

I found that one solution that modifing wp-settings.php and defining memory limit " define(‘WP_MEMORY_LIMIT’, ‘96M’); " it worked. But still it take long time to saving the settings and I need to know why this is happen.

Then i can fix that thanks any expert pls help me

This is solved thanks it is because large portion of data trying to save once and it happen because ’ character