![]() |
|
Article Options |
[How to] Cut down on memory usage
by
![]() This is in the manual but I've yet to see it mentioned here.
No members have liked this post.
Last edited by Brad; 09 Feb 2006 at 08:43.. |
||||||||
Views: 11357
|
Comments |
#2
|
||||
|
||||
Would this slow execution if lots of plugins were calling lots of files ?
__________________
Former vBulletin.org Staff Member
Cable Forum Please do not PM me about custom work - I no longer undertake any. Note: I will not answer support questions via e-mail or PM - please use the relevant thread or forum. No members have liked this post.
|
#3
|
||||
|
||||
Originally Posted by Paul M
A lot less then housing all the PHP for all files in memory at all time.
The bulk of my processing is done via external files.
__________________
AME3 for vB4 - Automatic Embedding of videos AME'fy for vB4 - Videos and more in your profile No members have liked this post.
|
#4
|
||||
|
||||
Originally Posted by Paul M
I agree
I think files modifications would be better for this purpose
__________________
No members have liked this post.
|
#5
|
|||
|
|||
I have been thinking about creating an extension that will allow 'include-files' for plugins. They would be loaded as regular plugins (not file uploads), and can be loaded into memory whenever needed (for example: require_pluginlibrary_once('myfunctionlibraryplugin'); ).
Like this you might get the best of both worlds: - No file uploads - Only loaded into memory when needed
__________________
Marco van Herwaarden Ex vBulletin.org Coordinator No members have liked this post.
|
#6
|
|||
|
|||
I like that concept, I think I am going to play with this some more.
No members have liked this post.
|
#7
|
|||
|
|||
i'm ditching the plugin system on most of my larger sites. I'm just hardcoding the hacks. The plugin system is great in principal, but it eats up memory, increases queries, and slows down execution.
No members have liked this post.
|
#8
|
|||
|
|||
![]()
Originally Posted by 99SIVTEC
Oh so true. If only there was a way to use this concept of the xml plugin to also upload a file like the above. So its not stored in memory.
No members have liked this post.
|
#9
|
|||
|
|||
Originally Posted by 99SIVTEC
If coded for saving memory(ie. 99% of executable code in include files), a plugin don't need to use much memory, nor does it need to use more queries or slow down significantly.
__________________
Marco van Herwaarden Ex vBulletin.org Coordinator No members have liked this post.
|
#10
|
||||
|
||||
Originally Posted by Brad
I feel better now. Somebody griped when I wrote my Amazon plugin this way
![]()
__________________
amykhar.com ---------------------------------------- I do not respond to PM requests for coding assistance. No members have liked this post.
|
#11
|
|||
|
|||
Just having the plugin system turned on uses extra queries. A good programmer ca hack vbulletin in such a way as to add few if any extra queries, but the system itself is what adds the extra queries.
Originally Posted by MarcoH64
No members have liked this post.
|
#12
|
|||
|
|||
Originally Posted by 99SIVTEC
Not sure on the exact amount of added queries when the plugin system is turned on, but it is not much, and they are good optimiyed and won't effect your board much from a performance point of view.
Remember that the number of queries is almost irrelevant for performance, it is the execution time that counts.
__________________
Marco van Herwaarden Ex vBulletin.org Coordinator No members have liked this post.
|
#13
|
|||
|
|||
Seems to me that just putting the plugin code in a php file and replacing it with
include('./plugins/my_script.php'); Doesn't work 100% No members have liked this post.
|
#14
|
|||
|
|||
Nobody ever said that things would work without any modification.
__________________
Marco van Herwaarden Ex vBulletin.org Coordinator No members have liked this post.
|
#15
|
||||
|
||||
1. Turning the Plugin System On or Off does not have any impact on the amout of queries.
2. Memory Footprint is not a such a big issue. In most cases, forumcache (which is loaded on every page) for example will be a lot bigger then the plugins. Having to eval() the code all the time, that is an issue. Therefore, complex plugin code (especially in high-traffic places like global.php, postbit, showthread, forumdisplay, etc.) should be moved out to include files. (Could even be done automatically. I wrote a proof-of-concept hack that writes include-files if the plugin-code on one hook is > X bytes long.) No members have liked this post.
|
![]() |
«
Previous Article
|
Next Article
»
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Article Options | |
|
|
New To Site? | Need Help? |
All times are GMT. The time now is 23:20.