• Commerce,  Episerver,  Order,  Uncategorized

    Control the thousand separator for Money in Episerver Commerce

    If you are selling goods in multiple markets which same currency but with different languages, such as EuroZone, you might notice that while everything looks quite good, except that the thousand separator might be off from time to time: it is always the same and does not change to match with the language, so sometimes it’s correct, sometimes it’s not. Let’s take a step back to see how to properly show the thousand delimiter  In the United States, this character is a comma (,). In Germany, it is a period (.). Thus one thousand and twenty-five is displayed as 1,025 in the United States and 1.025 in Germany. In Sweden,…

  • Commerce,  Episerver,  Performance,  Uncategorized

    Fixing ASP.NET Membership performance – part 1

    Even though it is not the best identity management system in the .NET world, ASP.NET Membership provider is still fairly widely used, especially for systems that have been running for quite long time with a significant amount of users: migrating to a better system like AspNetIdentity does not comes cheap. However, built from early days of ASP.NET mean Membership provider has numerous significant limitations: beside the “architecture” problems, it also has limited performance. Depends on who you ask, the ultimate “maximum” number of customers that ASP.NET membership provider can handle ranges from 30.000 to 750.000. That does not sound great. Today if you start a new project, you should be…

  • Uncategorized

    Why I left Metacritic, for good.

    I’m a mediocre gamer, by any measures, but that does not defy the fact that I love playing games. Great games, only. With my very limited time and budget, I must to be very selective about the games I play. For a very long time, Metacritic is my to-go website to check if I should play a game – and I set my rules rather high: anything less than 80 is a big no-no. Less than 85 is a no, unless it’s a sequel of a game I loved so much (so I can see how the story turned out to be). More than 85 is “I’ll think about it” (when…

  • Debugging,  Performance,  SQL Server,  Uncategorized

    Useful T-SQL snippets for development and troubleshooting

    This post is more of a note-to-self. These are the useful T-SQL statements which can be incredibly useful in development and troubleshooting [crayon-5c0e8d6ff3c52242118589/] Turn on the IO statistics for statements run after that until set to OFF explicitly. We then switch to Messages tab to see how many IO operations were done on each table. [crayon-5c0e8d6ff3c5b269760833/] Find out about the statements were executed: which statements, its texts, how many reads (logical), how many time was spent on CPU and how many time was spent total

  • Learning,  Life,  Random thoughts,  ranting,  Tips,  Uncategorized

    Choose your battles

    This is the third part of the series: How to survive and thrive – a series for new developers to become better at their jobs. You can read the first two parts here and here. In military, there is a term of “uphill battle”. That when you have to fight your way up a hill, when you enemy controls the top. It’s a very difficult fight and your chance of success is low. Any experienced military leader knows uphill battles are something you should avoid until there are no other options. That also applies with any jobs. Including programming. The truth is, you shouldn’t fight the battles you can’t win.

  • Catalog,  Commerce,  Episerver,  Performance,  Tips,  Uncategorized

    Mass update catalog entries

    This is something you don’t do daily, but you will probably need one day, so it might come in handy. Recently we got a question on how to update the code of all entries in the catalog. This is interesting, because even thought you don’t update the codes that often (if at all, as the code is the identity to identify the entries with external system, such as ERPs or PIMs), it raises a question on how to do mass update on catalog entries. Update the code directly via database query. It is supposedly the fastest to do such thing. If you have been following my posts closely, you must…

  • Commerce,  Episerver,  Order,  Performance,  SQL Server,  Uncategorized

    The art of paging

    No this is not really “art” – I’m just trying to have a more clickbait title. It’s more about understanding what you have at your disposal and use them for your benefits – in this case – how new SQL statement can drastically improve your performance. In this blogpost we will look into paging feature of SQL Server. in Commerce we usually work with large set of data – millions of rows are fairly common, and it’s natural to load data by page. There is no point loading thousands, or even millions of rows in one go. First it’s not practical to display all of them. Second you’ll likely end…

  • Commerce,  Episerver,  Order,  Performance,  SQL Server,  Uncategorized

    Fixing a stored procedure

    At Episerver development team, we understand the importance of good performance. Who would not like a lightning fast website? We work hard to ensure the framework is fast, and we seize (almost) every opportunity to make it faster. You know in Commerce 10.2 we introduced a new cart mode – serializable cart, and it’s proven to bring great performance compared to the “old/traditional” approach. Our own tests showed an improvement of 3-5x times faster. But can it be even faster? Probably yes. And actually we did some improvements in later versions. In the scope of this blog post, we will just focus into a specific aspect – and to learn…

  • CMS,  Commerce,  Episerver,  Performance,  SQL Server,  Uncategorized

    Maintaining your indexes

    Indexes are crucial to SQL Server performance. Having the right indexes might make the difference of day and night with your application performance – as I once talked here. However, even having the right indexes is not everything. You have to keep them healthy. Indexes, as any other kinds of storage, is subjected to fragmentation. SQL Server works best if the index structure is compact and continuous, but with all of the inserts/updates/deletes, it’s inevitable to get fragmented. When the fragmentation grows, it starts affecting the performance of SQL Server: Instead of having to read just one page, it now have to read two, which increases both time and resource…

  • CMS,  Commerce,  Episerver,  Uncategorized

    Episerver caching issue with .NET 4.7

    Update 1: The bug is fixed in .NET 4.7.1 (thanks to Pascal van der Horst for the information) Update 2: The related bug is fixed in CMS Core 10.10.2 and 9.12.5. If upgrading to that version is not an option, you can contact Episerver support service for further assistance. Original post: If you are using Episerver and update to .NET 4.7 (even involuntarily, such as you are using DXC/Azure to host your websites. Microsoft updated Azure to .NET 4.7 on June 26th) , you might notice some weird performance issues. If your servers are in Europe, Asia or Australia, then you can see a peak in memory usage. If your servers in…