All posts tagged #performance all posts RSS-feed

Performance in debug mode (Java/IntelliJ)

I'd like to highlight two steps to avoid performance issues when using breakpoints. Method/field breakpoints Is your application noticeably slower in debug mode, even when not in a break point? Did this problem start suddenly? Do computation-heavy tasks take especially long (like password hashing)? Then you may have some breakpoints that cost a lot of performance (why?). Breakpoints on lines of code are fast Breakpoints or fields and methods are slow (Breakpoints on declarations/comments don't work) In my experience, over... full post»

Example log4j2.xml (development)

For local development, I like to change some things in my log4j2 configuration. Make lines shorter, e.g. no worker names (just pid) or dates (just times). Prevent all logging to files, just console. Use colors for errors and warnings so they stand out. Filter out specific types of messages, and keep only specific other ones at debug level. Use buffering and async for better performance. So here it is! <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <Configuration monitorInterval="30"> <Appenders> <Console name="Console" target="SYSTEM_OUT" bufferSize="100">... full post»

Java performance: exceptions

This was a real performance problems recently, with some details redacted. It was found that filling in translated strings took up quite a lot of time. Translation requests are spread out all across the frontend, so no single step stood out, but with the help of YourKit, the problem was uncovered. As it turns out, the main problem was with this construct: for (int i = translationFiles.length - 1; i >= 0; i--) { try { ResourceBundle bundle = ResourceBundle.getBundle(translationFiles[i],... full post»

What is async/await?

I've been pretty active on Hashnode and inactive here lately. So I'm going to repost an answer I gave on Hashnode here, because I'm lazy like that... This is a conceptual explanation, not a beginner tutorial. Yes, async/await a way for the thread to not sit idle while waiting for something (usually IO like files, database or network). When you read a file synchronously, your code does not do anything while the disk is busy. This means that for programs... full post»

The markv.nl blog!

#shell, #data-science, #fortran, #type-systems, #chinese, #django, #useless, #bash, #Csharp, #games, #programming-languages, #china

Comments

  1. Rainbow colormap in javascript @Mark The post has been expanded to include non-rainbow colorm...
  2. Rainbow colormap in javascript @Mark Now finally with color-coded source!
  3. Bye Make, hello SCons (Fortran) @Mark For SCons' own comparison against alternatives, have a l...