Jeremy Davis
Jeremy Davis
Sitecore, C# and web development
Page printed from: https://blog.jermdavis.dev/

A blog about technology that catches my attention

It's a bit like a swap-file for my brain...

10 years, 341 posts and counting

Watch out for Events in your Sitecore code

They are an excellent way to break stuff if you don't understand them...

After my recent delve into memory optimisation for non-work code, I spent some time recently investigating a memory issue in a production Sitecore site. The outcome of that was an issue which can be a common problem for .Net code. So in the hope of seeing it less in the future, here are some notes on what I saw and how you can avoid the same trap...

Optimising your allocations in .Net

If you want to go fast, you need to care about memory...

I spend most of my working life building website code at work, and sometimes I get involved in performance work with that sort of system. In fact I've written and presented on that topic for Sitecore in the past. But some code I've been working on in my own time needs much more focus on code performance than that - the maths-heavy code for ray tracing. I've been looking at some optimisiations for that recently. And one thing that this has reinforced for me is how "easy to write" code can have some performance challenges...

Extracting blog article headings for navigation

I've been meaning to implement this for a while...

I've wanted to add some logic to this site to display article headings as navigation for a while. And I've also been thinking it would be helpful if you were able to link directly to headings. Pleasingly the Statiq engine makes doing this pretty simple, so here's how my attempt works:

C# Statiq ~6 min. read

My post-Symposium wrap up

What was novel and cool to me?

Symposium is over for another year. I have mostly recovered from the jet-lag now and I've wrestled my inbox into submission at work. So it's time to write up my thoughts on the conference. I took about 35 pages of notes over the course of the week, plus countless photos of slides. So from all that what stuck out as interesting to me?

What's the 'minimal change' to use Entra External ID for public login with Sitecore?

How much work would be required to allow its use?

I did a little proof-of-concept hacking recently around the idea of "what's the least work required to allow your existing Sitecore website public login to move to Entra". I ended up with the bones of an interesting approach, which might be of interest to others. So read on for ideas:

Docker might not like your Sitecore secrets

Why do I suddenly have odd looking warnings?

I quite often clone Sitecore's Docker Examples repo and spin up a Sitecore instance to experiment with. It's a quick way to create a disposable site which I can easily configure and deploy little bits of test code to. But recently I did this and noticed some odd warnings. So here's what happened and why, to help you avoid the same issue...

What looks good on the Symposium agenda?

Where are you likely to find me?

Having sorted out my travel plans for this October's Symposium and MVP Summit in Nashville**1 , I've been having a think about what sessions I'd like to go and see. Here's a summary of my thoughts so far...

Sitecore Symposium ~5 min. read

Fun gotchas with Sitecore GraphQL and .http files

Learn from my pain if you're using this tool to test queries

I was having a chat recently about alternatives to Postman if you needed to send HTTP requests to arbitrary web endpoints. I mentioned using Visual Studio's support for .http files for this during that discussion, and then found myself trying it out for some work too. But it seems there's a couple of tricky little bugs hiding in here, which tripped me up when I tried to set up a call to one of Sitecore's XM Cloud GraphQL endpoints.

Scripting your data with SSMS

I've had to look this up once too often...

As developers we often need to move data between SQL Server instances. Some of the time database backups are fine for this, because you want to move everything. But on occasion what you need is a SQL script which can insert some rows of data you had on another server for you. And when I find myself needing this feature, I also find myself having to google how to do it. So to help my memory, here's how to generate scripts for your data:

SQL Server ~1 min. read

A key trick that makes search fast

It's interesting to think about internals sometimes

Recently I added a basic search page to my blog. This is a pure static site, hosted on Github Pages, so there's no Solr or Algolia here. Just some clever JavaScript (Lunr.js) acting on data generated by Statiq. Setting that up made me think about the internals of how a search can work efficiently, and I figured others might be interested in this...

General ~5 min. read