44
votes
Accepted
Eliminate render-blocking JavaScript and CSS in above-the-fold content
The README has a guide on how to do this using current 7.x-2.31+ version of AdvAgg. Also see this wiki page on the High performance group. Most sites can achieve a perfect 100/100 score on https://...
27
votes
Accepted
Are there any performance comparisons?
No, there is no reliable comparison, because doing that is almost impossible. There are various reasons for that, one is that D8 vanilla is like D7 vanilla + a whole bunch of modules, especially views....
26
votes
Accepted
How Do I improve the performance of my Drupal7 Site?
These are notes from my experiences and might vary from what others experience. I predominantly use LAMP stack and have considered the same in my suggestions.
Thumb rules for caching that I generally ...
23
votes
How do you improve Drupal performance?
These are notes from my experiences and might vary from what others experience. I predominantly use LAMP stack and have considered the same in my suggestions.
Thumb rules for caching that I generally ...
23
votes
How can I make kint() load faster when debugging twig templates?
There are two other ways other users have mentioned for setting the max output levels in addition to the settings.php method mentioned in the question, plus a couple other ideas below:
Create a /...
18
votes
Accepted
How to get rid of Deadlocks and Lock time out type issues?
Read and follow this post; it assumes InnoDB.
In particular, see the part saying to add the following to the settings.php file.
$databases['default']['default']['init_commands'] = array('isolation' =...
17
votes
Accepted
Field Collection vs. Paragraphs
In many respects the Paragraphs module appears to be a fork of Field Collection. Functionally, the difference between the modules lies in how their respective field widgets operate. The Field ...
12
votes
How can I invalidate a cache on a specific View?
If you know the name of the view that you want to clear, then you can clear the caches specific to that view by calling a function like the following:
/**
* Function to invalidate selected views ...
12
votes
Accepted
Difference between drupal_static and \Drupal::state?
They perform different tasks.
drupal_static() only stores data for the current page load (or ajax load). For example, if you are loading something from a database table multiple times on a single ...
11
votes
How and where would I be able to enable/disable gzip compression?
Personally, I do not like the way Drupal handles output compression; I take care of this outside of Drupal.
On the Drupal site, I add
$conf['page_compression'] = FALSE;
$conf['css_gzip_compression'] ...
9
votes
Accepted
What happened to Drupal's performance?
D8 requires more resources and yes, you should have hosting with opcache enabled, which is included by default in PHP 5.5.
Drupal 8 has so many files because it includes symfony and other projects ...
8
votes
Accepted
Site performance , cache not working properly
Slide #85 from my performance presentation talks about max packet size in MySQL, you need to increase that value; SET GLOBAL max_allowed_packet=33554432; or change it inside of the configuration file ...
8
votes
CSS aggregration breaks site - how to troubleshoot?
Some initial things to check:
Clear the cache (if you're running advagg, clear its cache). You can end up with stale file references sometimes.
Find out what's happening to the missing CSS:
When the ...
8
votes
How can I make kint() load faster when debugging twig templates?
Kint is not the only library that you can use for debbuging variables and twig templates.
I suggest to use Symfony var-dumper that IMHO is one of the most powerful lib for debuging variables. Symfony ...
8
votes
Difference between drupal_static and \Drupal::state?
drupal_static() is used to cache data within a single page request. it stores the data in a static variable.
The class returned by \Drupal::state() handles values that need to be preserved between ...
7
votes
Is there a way to force some block caching despite system block caching option is disabled?
With latest Drupal 7.33 release there is a new setting variable now:
/**
* Block caching:
*
* Block caching may not be compatible with node access modules depending on
* how the original block ...
7
votes
Accepted
Where to render? Preprocess or template?
Drupal isn't consisting in this matter either I guess... In the default node.tpl.php variables are rendered while in other default templates (like html.php.php), variables are just printed.
That's ...
7
votes
Accepted
What is the fastest way to get node title from nid?
You said fastest.
If you can compromise two things, this should be the fastest one. Now, note that you have to compromise:
If you are only trying to get the node title, and if you are sure that ...
7
votes
How can I make kint() load faster when debugging twig templates?
FYI, as of Devel v3, you'll need to make two updates if you use the top method suggested by @chrisshattuck
Go to admin/config/development/devel?q=/admin/config/development/devel
Make sure "Kint" is ...
7
votes
Accepted
How to modify .htaccess to serve brotli compressed static assets over gziped ones?
Give this a try
# Rules to correctly serve gzip compressed CSS and JS files.
# Requires both mod_rewrite and mod_headers to be enabled.
<IfModule mod_headers.c>
# Serve brotli compressed CSS ...
7
votes
Accepted
Microkernel with low bootstrap level?
A lot of the bootstrap process happens now implicitly as services are requested.
If nothing requests the database service then Drupal won't open the connection to it and so on.
The minimal amount of ...
7
votes
Accepted
Why does loadMultiple load 1000 nodes 9.2 times faster than loading each node one by one?
It's likely that when you are loading individual nodes, you are loading the entity type manager, then for each node retrieve the storage, do a query to get the node data, and build the node. With the ...
6
votes
How to get rid of Deadlocks and Lock time out type issues?
The best way to get rid of deadlock errors once and for all is the Asynchronous Prefetch Database Query Cache module.
I can't recommend it enough. Brilliantly written and great performance gains.
6
votes
How can I avoid clearing caches when CSS changes are made?
Install AdvAgg, go to admin/config/development/performance/advagg and set "AdvAgg Cache Settings" to "Development"
If you don't want to do that, go to admin/config/development/performance and uncheck ...
6
votes
Are there any performance comparisons?
There are a bunch of patches for D8 that should land before it is released. This presentation at the 2015 LA DrupalCon should explain what is happening to make sure D8 is fast.
See here for an ...
6
votes
Accepted
Is there any way to cancel Panels' overlay edit windows?
I did some research and looked into Panels 3 code so far I don't see any nojs fallbacks. You can also check if there are fallbacks when you try to disable Javascript in the browser.
This may not be ...
6
votes
Accepted
Bandwidth Optimization options locked
There is a problem with the public directory, it is not configured or it is not writable. You can check this with drush:
drush ev "var_dump(is_dir('public://'), is_writable('public://'))"
Result ...
6
votes
Which method has better performance
This is essentially impossible to answer. You have one part of your question, wrong
Your first method uses a single node_load_multiple() with multiple node_save
Your second answer uses multiple ...
6
votes
Accepted
Is it helpful to improve performance by mysql table indexing?
The cache_default table already has an index by CID (as well as indexes by creation and expiry date that allow old entries to be discarded).
Since almost all queries to the table are by CID there's ...
5
votes
Delete all users and there content apart from user 1
You can use Views Bulk Operations (VBO) module...
Above module allows to execute bulk operations on nodes, users, comments; it also permits to apply the selected operation to all the nodes, users, or ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
performance × 5147 × 189
caching × 89
database × 61
views × 50
8 × 41
theming × 40
6 × 38
entities × 34
nodes × 23
javascript × 18
media × 13
debugging × 13
cron × 13
commerce × 11
search × 11
css-js-aggregation × 11
forms × 10
users × 9
proxies × 9
blocks × 8
files × 8
hooks × 7
panels × 7
taxonomy-terms × 6