Skip to content

Instantly share code, notes, and snippets.

View thebrainroom's full-sized avatar

Thomas Wilks thebrainroom

View GitHub Profile
@thebrainroom
thebrainroom / blissgo.php
Last active December 20, 2016 11:34
Get image style programmatically for Drupal 8
<?php
use Drupal\image\Entity\ImageStyle;
function blissgo_preprocess_node(&$variables) {
$node = $variables['node'];
if(!empty($node->field_image[0])) {
$path = $node->field_image->entity->getFileUri();
$url = ImageStyle::load('teaser_image')->buildUrl($path);
! function(e) {
"use strict";
e.ThreeSixty = function(t, r) {
var a, n = this,
i = [];
n.$el = e(t), n.el = t, n.$el.data("ThreeSixty", n), n.init = function() {
a = e.extend({}, e.ThreeSixty.defaultOptions, r), a.disableSpin && (a.currentFrame = 1, a.endFrame = 1), n.initProgress(), n.loadImages()
}, n.resize = function() {}, n.initProgress = function() {
n.$el.css({
width: a.width + "px",

Here is the comprehensive performance analysis with the recommended code remediation.

SPX Performance Analysis & Remediation

Based on the profiling data, the application suffers from significant performance bottlenecks caused by synchronous initialization of heavy components on every page load.

1. Primary Bottleneck: Session Blocking (~270ms)

Impact: 53.62% of total load time.