Recently Browsing 0 members
No registered users viewing this page.
Hey Ryan, hey friends,
we, Mobile Trooper a digital agency based in Germany, use ProcessWire for an Enterprise-grade Intranet publishing portal which is under heavy development for over 3 years now. Over the years not only the user base grew but also the platform in general. We introduced lots and lots of features thanks to ProcessWire's absurd flexibility. We came along many CMS (or CMFs for that matter) that don't even come close to ProcessWire. Closest we came across was Locomotive (Rails-based) and Pimcore (PHP based).
So this is not your typical ProcessWire installation in terms of size.
Currently we count:
140 Templates (Some have 1 page, some have >6000 pages)
~ 15k Users (For an intranet portal? That's heavy.)
~ 195 431 Pages (At least that's the current AUTOINCREMENT)
I think we came to a point where ProcessWire isn't as scalable anymore as it used to be. Our latest research measured over 20 seconds of load time (the time PHP spent scambling the HTML together). That's unacceptable unfortunately. We've implemented common performance strategies like:
We're running on fat machines (DB server has 32 gigs RAM, Prod Web server has 32gigs as well. Both are running on quadcores (xeons) hosted by Azure.
We have load balancing in place, but still, a single server needs up to 20 sec to respond to a single request averaging at around about 12 sec.
In our research we came across pages that sent over 1000 SQL queries with lots of JOINs. This is obviously needed because of PWs architecture (a field a table) but does this slow mySQL down much? For the start page we need to get somewhere around 60-80 pages, each page needs to be queried for ~12 fields to be displayed correctly, is this too much? There are many different fields involved like multiple Page-fields which hold tags, categories etc.
We installed Profiler Pro but it does not seem to show us the real bottleneck, it just says that everything is kinda slow and sums up to the grand total we mentioned above.
ProCache does not help us because every user is seeing something different, so we can cache some fragments but they usually measure at around 10ms. We can't spend time optimising if we can't expect an affordable benefit. Therefore we opted against ProCache and used our own module which generates these cache fragments lazily.
That speeds up the whole page rendering to ~7 sec, this is acceptable compared to 20sec but still ridiculously long.
Our page consists of mainly dynamic parts changing every 2-5 minutes. It's different across multiple users based on their location, language and other preferences.
We also have about 120 people working on the processwire backend the whole day concurrently.
What do you guys think?
Here are my questions, hopefully we can collect these in a wiki or something because I'm sure more and more people will hit that break sooner than they hoped they would:
- Should we opt for optimising the database? Since >2k per request is a lot even for a mysql server, webserver cpu is basically idling at that time.
- Do you think at this point it makes sense to use ProcessWire as a simple REST API?
- In your experience, what fieldtypes are expensive? Page? RepeaterMatrix?
- Ryan, what do you consider as the primary bottleneck of processwire?
- Is the amount of fields too much? Would it be better if we would try to reuse fields as much as possible?
- Is there an option to hook onto ProcessWires SQL builder? So we can write custom SQL for some selectors?
Thanks and lots of wishes,
Pascal from Mobile Trooper
What i wanna achive is a simple counter like that count up on visit (this is no problem) AND save the specific date (year/month/day) of the count...
in the end i will be able to get visits per day/per month/per year in a nice and dirty graph.
Just to have a way better simple counter system.
Should i only go with a complex setup of pages like this:
--stats (home template for pageviews)
---------29 ->page_views (integers on every day template)
Or just simple use:
--stats (home template for pageviews)
---->count (template) that holds simple field page_views and a date field
or could a fieldtype like tables (one table field for every month/year or so) be also a solution?
Or a own SQL table special for this and use it in a module? I don't have any experience on this topic...
What i have in mind of performance sideeffects on such a thing?
Or is there a solution that works with PW?
I wanna go the hard way and implement something like this:
only directly within PW and use the API to get the data...maybe create a simple module from it later i don't know if i could set it up right from the start 😉
this is the reason for my questions on more experienced devs
Kind regards mr-fan
Hello, I want to develop an eshop with processwire + padloper + any needed module (ex. ProCache n stuff).
Right now, the eshop is in CS-Cart and I hate it. Will pw be able to support "proper" eshop features such as some simple sales graphs, 1k+ products, shipping methods & costs, user registration, search history, order status, payment status (for bank transfers for example) etc.
For example I'm thinking that products and orders as sub-pages will be problematic (10k+ sub-pages)
I also want to know if it's actually worth it or if it would be better to move to a bigger platform which has some of these features out of the box.
Currently, the problem with CS-Cart is major lack of documentation which limits me in writing custom features (connection with shipping providers, export of data via CardDAV and more). Also CS-Cart is too complex to handle without documentation. I can manage and understand the code of PW but CS-Cart is just too big.
Of course the server is beefy enough to handle things even heavier than CS-Cart. My focus is on development process and workflow (I've already set up CD from github to a docker container for a small website)
EDIT: Sylius and Thelia2 really caught my eye. Comments on them will be appreciated
i have encountered a random problem with my processwire page. I have build a simple php file where i include the processwire index.php and run 1 simple database query and echo the total execution time of the script. I call this file periodically to check the performance of the page. Most of the time the execution time is under 0.5 seconds, but some times i goes up to over 3 or 4 seconds. The database query takes very little time, so the problem seems to be in the code called in index.php.
I checked my server and database metrics and they look perfectly fine. Has anybody experienced similar issues before? Or do you guys have any tips how to debug that issue the best?
Thanks for your help in advance