6. Optimize it!
1. Disable and uninstall unused modules.
2. Switch to non-database cache backend.
3. Enable page caching, CSS and JS aggregation.
4. CDN
5. Install “caching” modules.
6. Investigate page load time using XHProf and/or NewRelic, etc.
7. Configure cron jobs and other background processes.
8. Optimize slow queries.
9. Authcache?
7. Do more caching...
The Authcache module offers page caching for both anonymous users and
logged-in authenticated users. This allows Drupal/PHP to only spend 1-2
milliseconds serving pages, greatly reducing server resources.
How does it work?
Authcache saves the final rendered HTML of a page to serve visitors. A separate cache is created for each user role as defined by the
administrator, so some roles can be excluded if necessary.
Authcache places priority on serving pages to the visitor as fast as possible. After a page is loaded by the browser, a second HTTP request may
be performed via Ajax. This initiates a lightweight DRUPAL_BOOTSTRAP_SESSION that allows SQL queries to be executed (such as updating
the user "history" table or node "statistics" table), and returns any user-customized data to the page (such as form tokens or default values on a
contact form).
12. (Un)Real tasks?
● Less than 10 database requests
● Less than 100ms for the page generation
● More than 10 000 users per minute
● Page must be dynamic
18. Cons
1. It is custom. Too custom.
● Maintainability.
● Security.
● Documentation.
● Complexity.
● Bicyclelity.
● Development speed.
● All other things why we prefer Drupal over a custom solution.
21. Renderable arrays https://www.drupal.org/node/930760
"Render Arrays" or
"Renderable Arrays" are the
building blocks of a Drupal
page, starting with Drupal 7.
A render array is an
associative array which
conforms to the standards
and data structures used in Drupal's theme rendering system.
In many cases, the data used to build a page (and all parts of it) is kept as
structured arrays until the rendering stage in the theming system. This allows
enormous flexibility in changing the layout or content of a page, and provides future
performance enhancements as well.