$db->free_result
#1
I have seen that we have a $db->free_result method in the class files, but I can't seem to find it actually being used anywhere.  I checked in forumdisplay.php, search.php, and showthread.php which all have multiple select queries.  Yes, I know this is considered low priority, but it could make a bigger difference on large boards that have several users online at any one time.  Even if we can't do this for 1.8 series, we should clean this up for 1.9 series.
Reply
#2
Since all results memory is freed at script execution end I don't think it is really necessary to use it on mass. Would be interesting to know when to use it though with a least one practical use, since it is included in core.
Reply
#3
It is used several times: https://crossreference.mybb.de/nav.html?...esult.html (e.g. inc/init.php or inc/functions.php)
[Image: banner.png]
Reply
#4
I do think it should be used in search.php because you can get a large result set. Let's face it, search.php has all kinds of performance issues. It was bad enough that I ended up writing a plugin to make it a bit better a long time ago. I could probably make it better yet since I have more programming knowledge now than I did before. The queries that generate the list of threads and posts should also get it. I'm not sure what else tends to get large result sets.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)