changelog 001

I'm trying something new today - a short update on what I'm up to and more importantly, what I'm working on.

Vacation

Two weeks ago I went for a vacation in the middle of nowhere. The small country-side village didn't even have a grocery store, just mountains and beautiful views all around. It's always nice to escape the civilization for a while and reconnect with the nature.

The wifi was flaky and mobile data not existent. I tried hacking on some projects in the evenings, but I quickly realized how useless as a programmer I am when I can't google something every 2 minutes.

A lonely well right outside my airbnb.

Clockwork 5

The main project I focus on right now is the next major version of Clockwork. I've roped myself into this yearly major release schedule. I like it, adds some structure to things. At least we won't get stuck on a single release for 4 years like before.

Clockwork 5 was scheduled for a late August or September release. Which leaves us with September. Fortunately it's been pretty fun and things are moving on nicely. I guess it's time to pick up the pace though. You can see the progress in the master issue for this release.

Clockwork client-side metrics

Most developers nowdays are very much aware of how important the application performance is. Optimizing the backend is just half of the battle though. The client-side processing of all that javascript can often take even more time. Flickering and non-interactive, that's not the experience we want for our users.

I worked on a bunch of client-projects, where even though we kept the server-side performance in check, the final experience got totally ruined by the decision to include 5 different client-side tracking scripts. Because adding more tracking will magically increase the vistor count.

Fortunately we have some great web performance intiatives like Web Vitals and tools like Lighthouse. We also have some very helpful browser apis like the Navigation Timing API.

With Clockwork 5 you will be able to collect these client-side performance metrics. Supported are both navigation timings (like how long it took for the DOM interactive or complete event) and web vitals. You will find the collected metrics in a new client-side section in the performance tab.

This is my first attempt to bring some support for the client-side part of our work to Clockwork, let's see where it goes.

A new client-side section in the performance tab.

Clockwork toolbar

Sometime in the early 2010s I worked on this Symfony-inspired profiler toolbar for Laravel. I eventually abandoned this idea in favor of working on Clockwork in 2013. I swear gradients were a thing back then.

My eyes bleed.

Since then, Laravel Debugbar became by far the most popular profiler in the Laravel world. Even the first-party Laravel Telescope has some catching up to do. In Clockwork I went with a different approach, keeping the profiler separate from the rest of the app.

I stand by this decision, but the toolbar approach still has one unique advantage. With Clockwork you need to go looking for the profiling data, with Debugbar you always have your eyes on the metrics. This can help you notice performance issues that you wouldn't normally look for.

This is why I've decided to go full-circle and add an optional toolbar to Clockwork. I went with an implementation where the whole thing is implemented client-side. This makes installation as easy as adding a <script> from cdn or installing a dependency from npm.

The toolbar shows only simple metrics. Clicking on the blue arrow will open the full details in the Clockwork app.

An optional Clockwork toolbar.

Other projects

While I'm enojying working on Clockwork 5, I also look forward to work on something different for a change. The Clockwork Cloud proof-of-concept is collecting dust for over a year by now. Recently I've finally made a break-through on the UI, so I can't wait to work on it again.

I'm also prototyping this wiki-inspired app, that's fully client-side with Firebase as a data store. A community web radio project using Apple Music and Spotify. And I'm itching to work on a game project again.

Client-work

I've been tasked with upgrading and modernizing this huge restaurant portal written in Laravel. Took me a full work day to click through the whole app and find out all it does.

I've noticed it's anything but fast. Took me only a single day to optimise three most critical endpoints from over a second response time to the 300ms range. It's kinda sad that thousands of work-hours were spent developing this app and yet, no one took a single day to optimize it.

Of course I've used Clockwork to find the performance issues. I'm thinking about writing a detailed post-mortem on this project. Feels like the real-world examples would be useful.

Excel exports were a huge pain point for the customer, as some of them would run for minutes just to run out of memory and crash. I've chosen to replace the Laravel Excel library with Spout. This combined with some common Eloquent optimizations took the exports from minutes to seconds and under a hundred megabytes of memory use even for the most complicated export.

I definitively recommend looking at Spout if you find yourself in a similar situation. It has a streaming reader and writer. This means it does not hold the whole spreadsheet in the memory, which makes it infinitely scalable. And it's also freaking fast. It comes with one big caveat though. It only supports the most basic styles and excel features, limiting the possible use-cases.

Tea

I hated tea for the most of my life. Then I found out about the whole leaf tea. For years now I can't imagine waking up without a cup of a green or jasmine tea.

Lately I've been enjoying some black tea with milk. I first had it visiting London a few years back. I find black tea too harsh, but adding milk expands the flavour and creates almost coffee-like experience. If you somehow never had it, give it a try.

...

This update is partially inspired by the weekly updates published by Bystroushaak and Přemysl, it's always fun to read and catch up on what's everybody doing.

Thanks for reading if you made it this far. Here will be a link to the next update if I'll ever write one.

—its