Meeting Uwe Kleinmann: Shopware performance optimization with Blackfire

By Thomas di Luccio, on May 17, 2023

Uwe Kleinmann is the Head of Technology at Kellerkinder GmbH, a German remote-first Shopware backend agency. Working with PHP since 2007, on ecommerce projects since 2011, he has a proven track record in the industry. As a maker and an explorer, Uwe loves building apps, exploring new code bases and technologies, and talking about code with fellow developers. He has built a long, steady companionship with open-source software (OSS) development since the launch of GitHub in 2008, which played a pivotal role in Uwe’s professional journey, as it did for many of us in the tech industry. 

A maker and an explorer

One of Uwe’s many talents is finding his way around a new code base like an explorer in uncharted territory. His systematic explorations examine structures and dataflows, and make sense of the various, different processes in place. This is his process for discovering a new tool or understanding an issue within an existing project.

Another major year in Uwe’s journey was 2016, when he joined Kellerkinder and started working with Shopware. Though this was not his first step in ecommerce, as he previously worked on Magento projects.

A journey in ecommerce begins

Nothing can describe the feelings developers get when they can focus on adding value to end users instead of trying to forcefully glue things together while battling rigid platforms or frameworks.

Make code, not war—at work and in the world. There’s bliss in finding a place to peacefully and efficiently do your work, explore new possibilities, and create the best shopping experience possible without handling what should never be your responsibility.

For Uwe, that place was Shopware, where he was pleasantly surprised by the openness of the company, and the vibe of its active community.

Not only was Shopware great to work with, but it made contributing easy. Uwe’s first contribution occurred when investigating an issue with Shopware 5’s internal hook system wrongly handling passed-by-reference parameters.

Long story short, Uwe opened a pull request (PR) with the suggested fix, which Shopware’s core developers then reviewed to ensure the proposal’s applicability and roadmap compatibility, among other things.

Open-source contribution to Shopware

Shopware created a virtuous relationship with its community thanks to high contribution standards. Great code, tests, more tests, and meaningful documentation drive a high-quality pipeline of community contributions alongside the active involvement of Shopware itself.

Let’s also stress how powerful the philosophy of OSS is: anyone can make the world a slightly better place by contributing. It requires work, trust, and understanding. And, one commit at a time, that’s what we are doing—moving forward, adding value for all.

Of course, wanting to improve something one commit at a time doesn’t mean you don’t get impatient, especially when waiting for an application to respond. This can create a bad user experience and also be harmful to businesses.

Performance is critical for ecommerce apps

This is even more true for ecommerce applications. Customers expect a snappy experience and understandably become frustrated when pages take forever to load. The Akamai Online Retail Performance Report shows that performance is key: “A 100-millisecond delay in website load time can hurt conversion rates by 7 percent”.

On top of this, consuming excessive resources and, ultimately, more energy makes no sense in a world battling climate crisis. Better and smarter code leads to a reduced carbon footprint and generates less pollution. Uwe jokingly admits dropping “that’s not good for Green IT” in discussions with his team to bring the environmental impact of their code into play. 

Better code leads to a better world 

Performance becomes an even more appealing (and important) challenge for someone who likes to explore and have a global understanding of application behavior. As for open-source, there is more at play than code—it’s about our contribution to the world we build and will leave to new generations of makers.

Yet, reducing energy consumption is no simple endeavor, especially when it comes to large and complex applications. It often results in decisive tradeoffs between efficiency, performance, and customer value through features.

Those arbitrages can only be done with the proper tooling. Decisions have to rely on trustworthy facts and figures. Blackfire’s complete observability solution is designed to tackle this challenge. It allows you to drill down on performance issues, going from a bird’s-eye view of the whole application’s behavior to identifying the very function calls causing bottlenecks.

Shopware itself is investing in performance by leading many initiatives on that front. Blackfire and Platform.sh (which owns Blackfire) are actively working with Shopware to create the best possible shopping experience through their Shopware PaaS offering.

Uwe’s ecommerce journey continues 

Another pivotal moment in Uwe’s journey is the day he faced the dreadful n+1 query problem. That’s one of the all-time hits alongside “too many SQL queries” and “ORM computing changesets for everything.”

Here’s how it goes: A bottleneck has been identified on a listing page. After investigating, Uwe found a nasty loop constantly loading additional product data. Like he often says, that’s not good for Green IT.  In fact, that kind of performance issue can be very frustrating as it’s relatively simple to fix when located but very hard to discover without the proper tool.

But as we all know, practice makes perfect. After a couple more performance-related issues, Uwe started developing his workflow to detect, fix, and prevent those problems. He was soon able to help his teammates deal with performance issues, gaining even more appreciation for his performance optimization work.

Custom observability strategy is the way to go

Uwe then started working directly with Shopware benchmarking Shopware 6 in various server configurations and data scenarios to get a baseline of expected performance metrics.

His journey led him to become an advocate. On multiple occasions, Uwe spoke at conferences and local gatherings on the importance of performance in software development.

Working in an agency like Uwe does means no two projects are the same. We often discussed Observability Strategy in this blog. However, in agency life, there is no one-size-fits-all approach to performance optimization.

That’s why Blackfire Profiler is the go-to solution for short-term projects requiring performance love. It’s all about gaining a better understanding of the actual behavior of the application, so you can improve it as much as possible within the project’s time constraint.

Advocating for better coding practices

Long-term projects—for which Kellerkinder is building features from the ground-up— allow for the use of full-scale Blackfire features from the beginning. They can identify and fix what has to be improved, then ensure those optimizations last with tests and documentation. Performance issues can be mitigated before hitting production.

In all cases, Uwe strives to build a clear and shared understanding of the issues alongside proposed code changes. Since software development is a team effort,  everybody should try for optimal performance while growing as a developer along the way. It’s all about making the workspace, and the world, a bit better one commit at a time.

A big thanks to Shopware custom metrics, and to Uwe

Making work and the world better places requires proper tooling, and Blackfire is here for that. It also requires resources specific to the different frameworks used. Recommendations and explorable performance metrics make all the difference in understanding a situation and finding solutions.

This is why he designed and contributed a large set of Shopware 6.x custom metrics, so all Shopware users can better understand the performance issues they face.

So, thank you, Uwe, for all your contributions and for sharing your story with us today!

Join the convo today!

Blackfire has an open-source program providing free subscriptions to maintainers. Don’t hesitate to apply and contribute metrics and integration that could benefit the whole Blackfire community.

You can also reach out to us on Twitter! Or join the conversation on Reddit at r/platform_sh to discuss building custom tools with Blackfire that could improve the performance of your apps, and ease the developer experience.

Happy Shopware Performance Optimization!

Thomas di Luccio

Thomas is a Developer Relations Engineer at Platform.sh for Blackfire.io. He likes nothing more than understanding the users' needs and helping them find practical and empowering solutions. He’ll support you as a day-to-day user.