Is there an equation for calculating how much allowed memory would be used by the server when generating an html page with x number of dom elements? -
i have administrator page drupal site allows admin assign users markets. use jquery accordian widget display markets each user when clicked. page has grown on years , have 72 markets , 157 user. when html generated, there @ least 72 x 157 = 11,304 dom elements written html before page sent client. break allowed memory limit reaching 143.75m, have raise when want add user. understand bad design, i'm interested in ways of understanding complexity of large html pages in regards work server has perform. there general mathematical correlation between number of dom elements generated on page , amount of allowed memory server requires?
memory on server side largely unrelated number of dom elements produced, echoing strings. obviously, number of dom elements have correlation size of html (in bytes), , may end contributing amount of memory used. (this part pretty easy measure: save resulting html file, , ask os how space takes on disk.)
the largest portion of memory usage, though, actual data (arrays, objects, intermediate variables) used generate html. instance, if retrieving data database, more rows dealing with, more memory resultset take up; transformed between different representations, in memory multiple times.
it's worth noting php 5.4 includes pretty major improvements memory usage, if you're running earlier version, might worth looking @ possibility of upgrading.
Comments
Post a Comment