Optimizing the performance of Princeton University Press’ migration to Drupal 8
Drupal agency EvolvingWeb is back with more performance management expertise. How two lines of code can change the game in migrations.
Our dear friends @EvolvingWeb really are Blackfire power users. They recently contributed to Blackfire by creating the new Drupal 7 performance recommendations. And now, they saved up to 98% time on content migrations from Drupal 7 to Drupal 8. The Princeton University Press website was their first success there.
Content migration are obviously resources-hungry. Background cron jobs can easily take several hours to complete. Especially if you don’t do it the right way.
That’s where EvolvingWeb has just the right mindset. Don’t trust; measure. And once you get the measurements, don’t just look at high level time consumption. Function/method calls which are executed many times in the same request may be the source of exponential consumption, especially when dealing with large files.
Doing that check may result in a very simple code change, that will save your day.
static $count; if (is_null($count)) { $count = $this->doCount(); }
Wonder what that code snippet does? Check out EvolvingWeb’s full article.
Oh, and just for fun, they also found and other 50% improvement. Blackfire helped them realize that using a lower level FTP method would half the import time for a migration.
Have a Drupal site? Subscribe to the Profiler Edition and benefit from EvolvingWeb’s expertise through the Drupal 7 and 8 performance recommendations!
Happy profiling,