Questions tagged [performance]

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

54
votes
10answers
11k views

How do you improve Drupal performance?

Drupal is fast at develop, but the performance is so poor. It is hard to reach 50 request per second. And there are so many SQL queries in a simple web page. If you test the request time of a form ...
69
votes
3answers
11k views

Given that db_select is much slower than db_query, why would I want to use it?

For the background on this, please see http://drupal.org/node/1067802. Given all that, what situations exists where I might want to use db_select(), or should I be relying solely on db_query?
30
votes
2answers
32k views

Eliminate render-blocking JavaScript and CSS in above-the-fold content

I am building a Drupal 7 site. These are some of the modules I use: Adaptivetheme (theme), Views and Content Panes, Panels, Mini panels, Panels everywhere, Page manager, Superfish for menus, Addthis, ...
34
votes
9answers
5k views

What's a good balance between reusing fields versus creating new ones in the context of fields scalability?

I've read the following phrase on a website: Instead of adding new fields to a content type, adding existing fields is a better option to reduce the system’s complexity and to improve scalability. ...
54
votes
9answers
4k views

Real world experience in scaling and tuning performance

The website I'm working is allegedly going to have a massive hit rate soon after launch. The client is talking about the possibility of around 2500 hits per second over a day or so. Ignoring the ...
37
votes
16answers
16k views

Performance Problem: Delay on first request

I put together a D7 site with a Minelli subtheme. Along the way I experimented a lot with different themes, different modules. Somewhere along the way I developed an odd performance issue, and now I ...
16
votes
3answers
28k views

Best APC settings to reduce page execution time

I have Drupal 7, apc with php-fpm and apache behind varnish and512 MB RAM. I measure page execution time with devel module. Database query time is low (62ms) compared to page execution time which is ...
17
votes
2answers
4k views

What all contributes to drupal page execution time?

I have a site I am investigating that has major performance issues, using memcache I was able to bring number of queries down both in number and total exectution time ( from 3 secs to 230 ms) but the ...
15
votes
2answers
21k views

How to get rid of Deadlocks and Lock time out type issues?

I read multiple blogs, tried to google, it but didn't find any satisfaction from any solution. I have the following issues : PDOException: SQLSTATE[40001]: Serialization failure: 1213 Deadlock found ...
3
votes
1answer
2k views

Whenever I edit/update a node all the page caches for anonymous user are lost

I have the following cache settings on the performance page I have visited a few pages as anonymous user and made sure that they are being cached. Now I log in as admin in a different browser and ...
2
votes
1answer
1k views

Embedding views in tpl files

I need an advice. Is there any downsides when embedding views in the page/node tpl files like the following: <?php print views_embed_view('course_videos', 'block_1'); ?> and this <?php $key =...
23
votes
3answers
3k views

Is it redundant to use the “boost” module if varnish is used?

We run our Drupal instances behind a Varnish server, but we're looking at alternative/additional ways to speed up the site. Boost is a module that is frequently named for this purpose; it appears to ...
1
vote
1answer
3k views

Do Drupal websites have bad performance or are heavy?

I'm facing a lot of problems with my shared hosting company regarding the performance of my website. My website is not complicated at all, just text pages, and also some pages using the Views module, ...
91
votes
9answers
8k views

Do non-enabled modules affect performance?

Does having Drupal modules present, but not enabled have any effect on the performance of a Drupal site? To put it another way.. Would removing disabled modules from a Drupal site have a positive ...
10
votes
3answers
12k views

How Do I improve the performance of my Drupal7 Site? [closed]

For somebody who is new to Drupal, I see that there are many resources available on Drupal Caching but I am not sure which of them to use.
31
votes
2answers
13k views

PHP 5.4 and Drupal 7

I have heard that PHP 5.4 is faster than PHP 5.3. Would it be ok for Drupal 7 to run under 5.4, or various contributed modules may start to break the site? Anyway, If I use APC opcode cache, maybe 5....
11
votes
4answers
10k views

Are there any performance comparisons?

Are there any reliable performance comparisons between vanilla Drupal 8 versus Drupal 7? I have searched the web but only find the post "Drupal 7 vs Drupal 8 Performance Comparison", which is far ...
11
votes
1answer
2k views

How does bandwidth optimization work?

I have optimized to combine all CSS and JavaScript files in my site. . If I run Yslow in Firefox to see the components loaded for this site, it shows that it loads 8 JavaScript files, and 8 CSS ...
3
votes
5answers
2k views

Does having too many content types negatively affect site speed and performance?

I building a site that could potentially utilize 20 different content types. The content types are very similar, but may only utilize one or two fields that are unique to that content type, and they ...
8
votes
4answers
5k views

How do I avoid the error “out of memory”?

I'm currently working with Drupal 7, and I've the following modules installed, all updated to their respective last version: Views - 7.x-3.0-beta3 CTools - 7.x-1.0-alpha4 Panels - 7.x-3.0-alpha3 ...
3
votes
2answers
1k views

How to find the view/page/module that's generating a SQL statement

I have newrelic performance monitoring with my Pantheon hosting account. It shows "slow SQL" reports but I can't tell which page, view or module is generating a SQL statement. For example: SELECT ...
2
votes
1answer
497 views

Archive old content data in different database

How can i make archive my old content and save in different db with my cron job. I want to store in different DB because i want to increase my site performance. In drupal 7 what's the best way to do ...
4
votes
1answer
3k views

Is there any gain using Memcached module when APC is running good on large Drupal 7 site (one server)

I am successfully using the APC Cache module on my prod website (single server). APC is performing good, caching is done very well. I wonder could I gain anything more by implementing Memcache. I ...
2
votes
3answers
3k views

How can I have the JS/CSS cache refresh on every page load?

How to clear cache on every page load? I am doing CSS & JS theming and currently having to manually clear cache (using devel module) every time and then reload the page again to see my changes? ...
21
votes
4answers
5k views

How to get core to leverage a MySQL master/slave configuration?

I read this question MySQL master/slave replication not working and its answer: Using slave databases is barely implemented in Drupal core. If you are developing your own modules then calls to ...
22
votes
4answers
6k views

Best way to optimize for authenticated user performance?

The keyword here is authenticated! Currently (as far as I know) the de-facto ways to optimize for anonymous access are through static page caches (varnish/squid/boost). However, as far as I know ...
30
votes
4answers
4k views

Memory-saving cache-clearing strategies for large sites?

One of my Drupal 7 sites has thousands of fields, a bunch of content types, more than 25 views, and hundreds (soon to be thousands) of profile types. Because of this, I'm using a core patch that ...
12
votes
2answers
7k views

Using Drupal 7 with APC, Varnish and Memcache, what bins to put in which cache?

I'm optimizing a Drupal 7 website and I have varnish, memcache and APC all installed and working with their individual Drupal 7 modules. In my settings.php I have the $conf options below. My question ...
10
votes
2answers
387 views

What tables should or could be migrated to InnoDB, and which should remain MyISAM?

As per title: Is there a quick list of candidates for tables to migrate to InnoDB? And what should remain MyISAM. Some additional information The site has a fairly heavy read-load, but inserts ...
13
votes
6answers
7k views

How can I make kint() load faster when debugging twig templates?

I've seen quite a bit of discussion about how kint() from the Devel module is difficult to work with because it maxes out PHP memory limits and makes the browser drag. I've heard some thoughts on ...
13
votes
2answers
6k views

Drupal 7 and PageSpeed

The Apache module PageSpeed provides various optimizations for HTML, JavaScript and such, which is great. However, some of its features are redundant with Drupal's own aggregation and optimization ...
18
votes
3answers
4k views

What's the fastest method/implementation for an Ajax callback?

I have a map which loads markers via ajax on various/numerous map events. Currently, I define a custom page callback for my hook_menu() item which prints my json/js. Since my page callback does not ...
9
votes
3answers
3k views

How can I upload 1000s of nodes per hour to a live drupal 7 site and avoid deadlocks?

Not too long ago I wrote about deadlock here: PDOException: SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; Despite everything my development team tries to do, we ...
10
votes
4answers
4k views

file_scan_directory() takes about 10 seconds to execute

Using xhprof I noticed that file_scan_directory() takes more than 10 seconds to execute when front page loads. Why should it take such a long time? This is the output of xhprofile:
14
votes
4answers
1k views

Does having more enabled modules make the site slower?

Does having more enabled modules make the site slower? I have installed 30 modules for my site, and I am afraid that it will become too slowly.
12
votes
1answer
1k views

Best way to benchmark Drupal stack performance

I recently asked a question regarding Drupal performance and got some great replies. This got me thinking, what is a reliable/meaningful way to benchmark Drupal? It's easy to say "install APC, ...
4
votes
2answers
683 views

Views vs Performance

I'm designing a huge media site. It would need to have about 20 views on the homepage and should attract about 100,000 visitors daily. The site is hosted on a dedicated server. Other than setting up ...
12
votes
2answers
12k views

How can I stop the cron tasks from being triggered by site visitors?

My site's logs show that cron is triggered if someone visits the website. This is slowing down the load time for the first visit. The cron is configured to run each 3 hours here: Administration » ...
10
votes
3answers
9k views

What is the best way to minify drupal's aggregated javascript (automatically)?

Have just run Google pagespeed over my newly created drupal 6 site, and it reports: Minifying the following JavaScript resources could reduce their size by 15.6KiB (12% reduction). Minifying ...
8
votes
2answers
3k views

load balancing multiple horizontal drupal instances

I've developed a REST WebAPI using the Services module. It works fine. I have a client of that API with projected usage requiring I horizontally scale my Drupal instance. Note that due to the nature ...
9
votes
3answers
5k views

How can I speed up drupal's node_save() function?

I am having a lot of trouble with the inefficiency of node_save(). But is node save my problem? That's ultimately what I am trying to find out. I created a loop with 100,000 iterations. I created ...
7
votes
2answers
3k views

How to speed up Drupal 7 compiling PHP to C++?

I would like to improve Drupal 7 performance with HipHop or any other similar solution transforming the code from PHP to C++ or C. What steps are needed to properly do the scenario below ? I would ...
4
votes
1answer
839 views

What does General Cache Wipe mean

The definition of CACHE_TEMPORARY used in cache_set reads as follows. CACHE_TEMPORARY: Indicates that the item should be removed at the next general cache wipe. I am just curious as to what ...
3
votes
3answers
949 views

How to increase the performance of my website in Drupal 7

I have tested my website on http://www.webpagetest.org/, and I found my website performance is very bad. I have used minifying of CSS and JavaScript, and reducing the pic size; performance is still ...
3
votes
2answers
2k views

How do I asynchronously run things?

I used Drupal 7.14, Video Module 7.x-2.5, VideoJS 7.x-2.0 HTML5 player, and ffmpeg 0.7.2 to transcode a 200mb mp4 video into Ogg, Flv, MP4 formats. The process worked, but took over 1 hour. Using the ...
2
votes
1answer
5k views

Leverage browser caching issue [closed]

I added some lines in my .htaccess file, following Is it possible to leverage browser caching?, but Page speed tool still throws "Leverage browser caching error." for only images.
2
votes
2answers
2k views

First page load/execution slow, login slower Drupal 7

Drupal 7 site experiencing slow execution/load time for first page visit and slower execution/load time for login. The web server and database servers are dedicated and well resourced, the site has no ...
1
vote
2answers
2k views

How to set up APC on Drupal 7 with httpd + fastcgi?

Can you recommend how to set up APC for a site running Drupal 7 on apache2 with fastcgi ? I got to the point where apc.php shows only one file cached that is apc.php itself. I cannot see if APC cache ...
11
votes
1answer
4k views

Field Collection vs. Paragraphs

I used Field Collection in my previous sites and I faced some performance issue, So this time I am looking a alternative for Field Collection. I find a answer Alternative to Field Collection. but I ...
7
votes
2answers
9k views

What module will show me all sql queries being run on the loaded page? [closed]

My site is running slow and I suspect its a module, but not sure which one. Is there a module that can display all the sql queries being run on a loaded page? If there isn't maybe there is a command ...