Questions tagged [performance]

Use it for questions about Drupal's performance, how to measure, and improve it.

Filter by
Sorted by
Tagged with
0 votes
1 answer
54 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 ...
user avatar
0 votes
0 answers
47 views

How can improve performance?

I have a very complicated form with 7-8 tabs and 150 elements on forms. The form initially loads very slowly and it will take 30 - 40 seconds to load and sometimes gateway times out error. When I used ...
user avatar
  • 109
0 votes
1 answer
44 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 ...
user avatar
  • 117
2 votes
0 answers
43 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 ...
user avatar
0 votes
0 answers
29 views

How to stop the need to flush browser cache AND rebuild Drupal cache after every sub theme CSS change? [duplicate]

How to stop the need to flush browser cache and rebuild Drupal cache after every sub theme CSS change? Doing so would ease my testing of minor CSS changes done online (such as switching a background ...
user avatar
  • 1
0 votes
0 answers
171 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. ...
user avatar
  • 892
0 votes
0 answers
156 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 ...
user avatar
2 votes
1 answer
345 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 ...
user avatar
  • 26.5k
2 votes
0 answers
117 views

How do I safely mark the listener as passive and keep it working? [closed]

I'm trying to optimize the website performance according to the Google PageSpeed recommendations. One of the advices is to set touch and wheel event listeners as passive, which is shown for the core/...
user avatar
  • 123
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. ...
user avatar
  • 323
2 votes
2 answers
164 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 ...
user avatar
  • 157
1 vote
2 answers
118 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 ...
user avatar
0 votes
0 answers
58 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 ...
user avatar
  • 55
3 votes
0 answers
40 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 ...
user avatar
  • 31
0 votes
1 answer
764 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 ...
user avatar
0 votes
1 answer
83 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 ...
user avatar
0 votes
0 answers
35 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 ...
user avatar
0 votes
1 answer
247 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/...
user avatar
0 votes
0 answers
27 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 ...
user avatar
0 votes
1 answer
233 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 ...
user avatar
3 votes
1 answer
139 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, ...
user avatar
  • 33
1 vote
1 answer
34 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....
user avatar
  • 374
5 votes
1 answer
1k 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 ...
user avatar
1 vote
2 answers
272 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 ...
user avatar
0 votes
1 answer
36 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 ...
user avatar
-1 votes
1 answer
203 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 ...
user avatar
3 votes
0 answers
241 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. ...
user avatar
1 vote
1 answer
171 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 ...
user avatar
  • 171
0 votes
1 answer
750 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 ...
user avatar
  • 7,816
-1 votes
2 answers
136 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 ...
user avatar
  • 3,247
0 votes
0 answers
79 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 ...
user avatar
1 vote
1 answer
209 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,...
user avatar
  • 401
1 vote
0 answers
253 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 ...
user avatar
  • 31
0 votes
0 answers
88 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 ...
user avatar
  • 281
0 votes
1 answer
145 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 ...
user avatar
  • 35
1 vote
1 answer
201 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 ...
user avatar
  • 131
2 votes
1 answer
245 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 ...
user avatar
  • 131
1 vote
0 answers
43 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 ...
user avatar
2 votes
1 answer
1k 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 ...
user avatar
  • 3,829
1 vote
0 answers
46 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/...
user avatar
1 vote
1 answer
71 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 (...
user avatar
  • 7,123
2 votes
4 answers
6k 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 ...
user avatar
0 votes
1 answer
452 views

How to change URL images for CDN

I have a website in Drupal 7 with "N" images in Sites/default/files and I need move this images to CDN. Is this possible?
user avatar
  • 185
0 votes
1 answer
72 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 ...
user avatar
0 votes
0 answers
398 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. ...
user avatar
  • 26.5k
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 ...
user avatar
  • 451
-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)....
user avatar
3 votes
2 answers
566 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 ...
user avatar
  • 85
0 votes
1 answer
115 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 ...
user avatar
  • 1,907
1 vote
2 answers
233 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 ...
user avatar

1
2 3 4 5
11