worry about it when it becomes an issue... not now.
Laravel RAM usage problem
Hello. I'm creating a social network with common features like Facebook and etc, with Laravel. I knew it was risky to use Laravel for large project but i recently decided to calculate my project performance.
I used memory_get_usage() PHP function to calculate amount of allocated memory (RAM). I encountered with a large number: ~8MB !! (with opcache enabled: ~2MB)
I tested it even on fresh and pure Laravel and almost got same number !
Old version of this project was running with PHP base. Used RAM on this project was just ~300KB !
And now i'm more worry about launching large project with Laravel.
So you build a site that shows a list of users, maybe it allows posts and comments.
But then you realise that you need to do session management better, and then perhaps an ORM would help, oh, and an eventing system... ok, so Ram use is starting to creep up a bit.
Oh, and we want to send emails from our application, and some caching would help, plus its really tedious building out views without any helpers, and some middleware would help filtering and processing of requests, plus some things need to come in via ajax into an API.
Wow, these images on my cheap shared server are really eating up the space, perhaps I ought to create a storage framework that allow images to be pushed off to S3.
It would be nice to have some sort of mechanism that allows notifications to be pushed to users so that they know when their friends have posted....
But hey, I now have a right bunch of spaghetti code and my Ram use is really worryingly high
I wish I had just gone with a polished framework in the first place since now I have all this functionality I'm using a lot more RAM than I expected.
Oh F-it I'll just get a server with 2GB ram since ram is so cheap these days.
Please or to participate in this conversation.