Questions tagged [performance]
Use it for questions about Drupal's performance, how to measure, and improve it.
513
questions
-1
votes
1
answer
62
views
Using common database for multiple developers in local environment gets slow
When use the common database to develop in local environment for multiple developers in one Drupal 9 project is getting too slow. This issue occurs on Drupal sites only, others (Wordpress, Laravel, ...
0
votes
1
answer
315
views
Why is the Cache-Control always "no-cache" and "X-Drupal-Dynamic-Cache" UNCACHEABLE on this site?
I have a production website for quite a long time now.
By digging, we found that the Cache-Control was always to "no-cache" and "X-Drupal-Dynamic-Cache" is UNCACHEABLE
My settings....
0
votes
1
answer
427
views
CKeditor 5 does not load with Aggregate JavaScript files option
I use Drupal 9.5.5, CKeditor 5 and BootstrapBarrio theme.
When I enable "Aggregate JavaScript files" option in Performance, CKeditor does not load when a user (non admin) edits node.
I ...
1
vote
1
answer
657
views
How do I apply the `loading="lazy"` attribute to responsive media?
On my Drupal 9 installation when I create an "image" field, Drupal automatically adds the loading="lazy" attribute.
When I create a "media" field with an "Adaptive ...
0
votes
1
answer
159
views
Sorting on a custom date field is slower than sorting on relevance: Is there a solution?
I'm using search api with database backend on a Drupal 9.3.3 site.
I've indexed 26,000 nodes of a custom content type and these include a custom date field: field_display_date
The index is set up to ...
2
votes
0
answers
64
views
Views performance: Teaser vs Fields
I have to create a view on a Drupal 7 site which will have 6/8 node fields. There will be some logic for which I will have to rewrite results as well as create a views-view-field-XX.tpl.php template ...
1
vote
0
answers
755
views
How to debug ccs and js aggregation problem
I'm working on a D9 website. On my local server I have all caching and performance settings like js and css aggregation turned off. Now when I copy my site to me remote server these settings are on. ...
0
votes
0
answers
466
views
Save multiple entities in one transaction
We have a custom API endpoint that handles data for multiple users. Unfortunately, we are having a performance issue because every time we save a user entity, the save operation takes 3-4 seconds to ...
4
votes
1
answer
1k
views
Debugging "UNCACHEABLE" header
We have a site where the homepage is not being cached and contains the headers:
x-cache: MISS, MISS
x-cache-hits: 0, 0
x-content-type-options: nosniff
x-drupal-dynamic-cache: UNCACHEABLE
I narrowed ...
0
votes
0
answers
76
views
Sharing Heavy Operations between multiple Page Elements
I have a page with two separate page elements. One is a table-select form that shows an extensive list of content data. The other page element is a block that shows a summary of that same content.
...
2
votes
2
answers
220
views
Is it helpful to improve performance by mysql table indexing?
Yes I am talking about manually indexing drupal cache table.
Is it helpful to improve site performance by indexing cache table?
For ex::
SELECT cid, data, created, expire, serialized, tags, checksum ...
1
vote
2
answers
233
views
How can webform performance be improved on low internet connection?
I built a site with Drupal 9 and webform.
The form consists of three pages and contains a few computed fields.
On the first page are mandatory fields.
The form is used by logged-in users only.
When on ...
0
votes
0
answers
83
views
Adding a dependent field with the Business Rules module makes the loading time and queries increase abnormally
I have an entity form with a dependent field. The dependent field is created following this guide and using Business Rules module.
Everything works fine, but now the form takes an insane amount of ...
3
votes
0
answers
42
views
Speed up login after changing user name datastore type to VARBINARY from VARCHAR
We have a project underway that requires the import of ~6 million users into Drupal (Core 7x) that have many (150K+) case-insensitive duplicate usernames. Importing these users with existing case and ...
0
votes
1
answer
2k
views
How do I set the height and width for images that use a responsive images style?
When using the core Image module, the height and width of images are automatically set. But when I use the Responsive Images module and a Responsive Image style, then no height or width is set.
Users ...
0
votes
1
answer
145
views
ExtensionDiscovery::scanDirectory() takes too long
I have been debugging a bit an issue on our platform and I notice that our scanDirectory takes, from time to time, way to long, more than 100seconds.
I have been looking at the default.settings.php ...
0
votes
0
answers
47
views
For performance, one multi-value field or four individual fields?
I have a node content type that needs to store four different int values:
Score A
Score B
Score C
Score D
Each node of the content type always has all four int values.
I could store this one of two ...
0
votes
1
answer
353
views
The "Modules" page doesn't load
I am running a setup on Ubuntu and WSL (Windows Subsystem for Linux) with Nginx and PHP7.4.
Drupal 8 and Drupal 9 fresh installations load every page with no problem, except the page on /admin/...
0
votes
0
answers
33
views
Select which assets and scripts should load on certain pages
This is to avoid loading other assets and scripts that are not needed for certain content types, pages, etc.
I have seen this in wordpress, there are performance plugins that allow you to selectively ...
0
votes
1
answer
603
views
Advanced CSS/JS Aggregation Module Breaks My Site Layout
When I enable my module Advanced CSS/JS Aggregation it breaks my site layout. Is there something I need to do before or after when enabling this module.
To fix the site layout I need to disable the ...
3
votes
1
answer
211
views
How do I free the memory used from node_load()?
I am using code similar to the following one.
for ($i = 0; $i < 1000000; $i++) {
$nid = get_node_id($i);
$node = node_load($nid);
$data = [
$node->field_1,
$node->field_3,
...
1
vote
1
answer
55
views
How does routing order / matches effect performance?
I have all the following GET routes defined in my_module.routing.yml:
my_module.members_uid:
path: 'users/{user}'
my_module.members_uid_gid:
path: 'users/{user}/group/{group}'
my_module.user....
7
votes
2
answers
2k
views
Why does loadMultiple load 1000 nodes 9.2 times faster than loading each node one by one?
I have always known that loading multiple nodes at the same time is faster than loading them one by one.
What I wasn't aware of, is the huge performance difference between the two ways of loading ...
1
vote
2
answers
388
views
How to achieve clean HTML markup?
If you visit official website of Dries Buytaert https://dri.es/ and look into the source you will see very clean and minimal markup with no unnecessary tags and classes, eg:
When I create a simple ...
0
votes
1
answer
50
views
Do custom theme suggestions execute on every page load and does that impact performance?
I've been working with Drupal for a little while now and one nagging question I've had is about whether or not logic in my *.theme or *.module files have any impact on server load.
Let's say I have ...
-1
votes
1
answer
267
views
Create the FooTable functionality by using only views
I noticed by using FooTable display on one of my view on a Drupal 8 site, it is increasing the load time of the view by more than 2000 ms.
The main idea i am using Footable is because of the ability ...
3
votes
0
answers
304
views
Warming up dynamic page cache for authenticated users
We're currently working on a rather complex Drupal 8 based website. After clearing caches, the majority of pages/routes require about 30-60 seconds for being rendered/returning the desired results. ...
1
vote
1
answer
208
views
How to make use of the render placeholder system for cacheablejsonresponse?
I have custom controllers which provide CacheableJsonResponse responses. Those responses are quite heavy to build (couple of seconds), so I want to build them better. I build those responses by ...
0
votes
1
answer
949
views
Serve compressed JS and CSS with S3 as filesystem
We have a Drupal 8 site using S3 file system integrated via the S3 File System module.
The aggregated CSS and JS are uploading on S3, however I am not seeing any configuration to serve compressed ...
-1
votes
2
answers
190
views
Database Insert Slower On Production Server [closed]
I recently upgraded the PHP version to 7.1 on my production server. I also updated my local to 7.1 and staging to 7.1. Only on production, I am seeing a slow down when I import a csv file and insert ...
0
votes
0
answers
102
views
Solr-based View, Row cache
Context:
Drupal 8.5, Search API Solr 2.2
There's a Solr-based view with Field display mode, as the results are not just nodes, there are non-Drupal content too.
Right now the dynamic page cache is ...
1
vote
1
answer
243
views
How should I deal with a vocabulary with many terms?
I'm trying to use Drupal 8, but if Drupal 7 is better for that, I'm ready to go back to Drupal 7.
I have a vocabulary that must contain at least 10,000 terms, but they can also become more than 100,...
1
vote
0
answers
356
views
Diagnosing slow requests between Varnish and Nginx
I have been trying to diagnose slow page load time in my local Drupal 7 environment when using Varnish.
My local environment runs in Docker using docker-compose. I have a containerised Varnish ...
0
votes
0
answers
111
views
Very slow menu_tree_check_access query - how to debug
I have a Drupal System which is running fine in production and locally but the dev/cons Db seems to have a problem.
After looking a bit deeper into it I found that menu_tree_check_access takes 3.8 Sec ...
0
votes
1
answer
395
views
db_insert a lot of records
I am struggling to sort out how to insert a lot of records using db_insert
Please see below for the code.
I can't have a for loop in the array. It breaks but I am dealing with looping through a lot ...
1
vote
1
answer
211
views
Increasing performance of cache_form on high traffic sites
I am noticing a significant performance increase in my load testing when this table is small, but due to a large traffic site this is growing very quickly.
I have read that it is not a good idea to ...
2
votes
1
answer
254
views
Serve Anonymous Pages when users are logged in for some pages
so essentially I have a Drupal website with great performance for anonymous users and terrible performance for logged in users.
What I am looking for is a way to serve some pages that logged in users ...
1
vote
0
answers
44
views
How can I drill down to find the culprit function? [closed]
I can see high CPU usage when I hit search URL of my Drupal application. I have enabled XHProf module and UProfiler extension on PHP5.6 to find the culprit function.
But the report I am getting is ...
2
votes
1
answer
2k
views
remove link tags in head
I am working on a project involving migrating a site with many static pages to Drupal 8. Since a number of the pages are old blog posts, there's often broken links, broken images, etc.
For quality ...
1
vote
0
answers
47
views
Page not found errors for images
The site becomes painfully slow at times and when I look into "Recent Log Mesaages" logs such as this is frequently found.
The Location shows:
http://example.com/sites/default/files/styles/featured/...
1
vote
1
answer
76
views
Is it better for performance to disable unused default core views?
I'm seeing 5 views on my site that I'm not using and want to disable to keep things clean and performant, but I worry it could cause a problem somewhere down the road.
The views are:
Frontpage (...
3
votes
4
answers
7k
views
Performance is notoriously slow
This feels like a repeat post but I can't find an actual answer. I just installed Drupal 8.4.4 on an Azure App Service (S3 Standard 4core 7GB RAM / PHP 7.0.6) and Azure Database for MySQL (Standard ...
0
votes
1
answer
78
views
Hundreds of unserialize requests
I have a large Drupal 7 website on my hands that is very large and has loads of modules (over 200).
I am already seeing poor performance symptoms in the FPM logs with max_children limits reached on ...
0
votes
0
answers
440
views
Performance hit from using the Statistics module?
For a site that we will have 99% of users seeing Varnish/Memcached layers, what is the general performance hit to enabling the core Statistics module? The site may have thousands of visitors daily.
...
4
votes
1
answer
1k
views
Improve D8 performance to access a custom REST controller
Context
I'm currently upgrading a site from Drupal 7 to Drupal 8.
In the D7 version, there was a custom "proxy" module which served back-end services. Requests starting with a /service prefix, such ...
-2
votes
3
answers
3k
views
Slow Drupal 7 Load Time [closed]
I have a 10 second page load time on Drupal 7.52. It has the approximately the same problem on localhost and my server.
On my localhost (WAMP) Apache uses an insignificant amount of CPU (3% or less)....
3
votes
2
answers
601
views
Rules: Load List of Entities by Object or Entity ID (Performance)
I'm looking to load a list of Users by an Entity Reference Property within Rules. There may be times when I need to load hundreds or thousands of Users that have a matching Property to update a ...
0
votes
1
answer
132
views
Nightly truncating all cache_* tables? Good or bad?
I'm having some issues on various D7 sites with some cache tables growing stupidly large (e.g cache_metadata or cache_menu) which then makes drush cc all very slow (more than 1 minute).
Do you think ...
1
vote
2
answers
267
views
How do I setup Drupal/Varnish caching so Content Editors don't see browser-cached pages after logging in?
I've got a bit of a situation going on with our caching solution and would love some input.
We use a solution of HAProxy -> Varnish -> Apache. HAProxy terminates SSL and sends that to Varnish which ...
0
votes
1
answer
131
views
Most performant way to check if a user is referenced in any node of a specified type?
I need to get a list of all users that have a specific role. Those users can be referenced in a multivalue field of a specific content type; some users are referenced in multiple nodes of that content ...