<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/as-a-lead-did-you-ever-see-big-o-problems-appear-in-logging-or-diagnostics--sbg3cztwp" -->

---
title: As a lead, did you ever see Big O problems appear in...
description: A real-world example of O(n²) complexity hiding in a logging system: appending logs to a growing array and reserializing the entire array on every flush caused...
canonical: https://daily.dev/posts/as-a-lead-did-you-ever-see-big-o-problems-appear-in-logging-or-diagnostics--sbg3cztwp
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: As a lead, did you ever see Big O problems appear in logging or diagnostics? | daily.dev
og:description: A real-world example of O(n²) complexity hiding in a logging system: appending logs to a growing array and reserializing the entire array on every flush caused...
og:url: https://daily.dev/posts/as-a-lead-did-you-ever-see-big-o-problems-appear-in-logging-or-diagnostics--sbg3cztwp
og:image: https://api.daily.dev/og/posts/sBg3CZTwP.png
og:image:alt: As a lead, did you ever see Big O problems appear in logging or diagnostics?
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# As a lead, did you ever see Big O problems appear in logging or diagnostics?

**[Rebeloper](https://daily.dev/sources/rebeloper)** · 1 min read · 0 upvotes · 0 comments

## Summary

A real-world example of O(n²) complexity hiding in a logging system: appending logs to a growing array and reserializing the entire array on every flush caused massive IO spikes in production during long sessions. The fix was switching to streaming writes to avoid full rewrites on each entry.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.youtube.com/watch?v=N1g5tGKt22g>

---

[View this post on daily.dev](https://daily.dev/posts/as-a-lead-did-you-ever-see-big-o-problems-appear-in-logging-or-diagnostics--sbg3cztwp)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"As a lead, did you ever see Big O problems appear in logging or diagnostics?","url":"https://daily.dev/posts/as-a-lead-did-you-ever-see-big-o-problems-appear-in-logging-or-diagnostics--sbg3cztwp","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/as-a-lead-did-you-ever-see-big-o-problems-appear-in-logging-or-diagnostics--sbg3cztwp"},"datePublished":"2026-03-05T13:12:51.464Z","dateModified":"2026-03-05T13:13:06.758Z","description":"A real-world example of O(n²) complexity hiding in a logging system: appending logs to a growing array and reserializing the entire array on every flush caused...","image":"https://i.ytimg.com/vi/N1g5tGKt22g/sddefault.jpg","thumbnailUrl":"https://i.ytimg.com/vi/N1g5tGKt22g/sddefault.jpg","isAccessibleForFree":true,"articleSection":"Rebeloper","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Rebeloper","logo":"https://media.daily.dev/image/upload/s--W0sZL8K4--/f_auto/v1726990075/logos/rebeloper","url":"https://daily.dev/sources/rebeloper"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/as-a-lead-did-you-ever-see-big-o-problems-appear-in-logging-or-diagnostics--sbg3cztwp","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"","timeRequired":"PT1M","video":{"@type":"VideoObject","name":"As a lead, did you ever see Big O problems appear in logging or diagnostics?","description":"A real-world example of O(n²) complexity hiding in a logging system: appending logs to a growing array and reserializing the entire array on every flush caused...","thumbnailUrl":"https://i.ytimg.com/vi/N1g5tGKt22g/sddefault.jpg","uploadDate":"2026-03-05T13:12:51.464Z","duration":"PT1M","url":"https://api.daily.dev/r/sBg3CZTwP","embedUrl":"https://www.youtube.com/embed/N1g5tGKt22g"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Rebeloper","item":"https://daily.dev/sources/rebeloper"},{"@type":"ListItem","position":3,"name":"As a lead, did you ever see Big O problems appear in logging or diagnostics?"}]}
```

