Welcome Guest, Not a member yet? Register   Sign In
Looping through views performance
#1

[eluser]albertleao[/eluser]
I'm sure this has been tested somewhere but I haven't found a clear answer.

I have a stream of data separated into posts. The posts can be fairly complicated so I isolated each individual type of post into its own view. I have a helper function which I call in my main view file called "create_feed($feed)". In this helper function I loop through the posts to create the views. My question is the following:

Is it faster to create a single function that outputs HTML for the view or to call a view multiple times?

For formatting purposes I need the view/function to only return the data. So I currently wrap ob_start() and ob_get_clean() to get the output of the function to then output them to my user.

Is this slower than just looping through views? It's been so long that I coded this but I believe at some point someone said that once a function is loaded in php, you can iterate through it much faster than calling a view 100 times.



Messages In This Thread
Looping through views performance - by El Forum - 01-23-2014, 12:34 PM
Looping through views performance - by El Forum - 01-23-2014, 12:56 PM
Looping through views performance - by El Forum - 01-23-2014, 01:06 PM
Looping through views performance - by El Forum - 01-23-2014, 01:09 PM
Looping through views performance - by El Forum - 01-23-2014, 01:21 PM
Looping through views performance - by El Forum - 02-02-2014, 07:03 AM



Theme © iAndrew 2016 - Forum software by © MyBB