https://cv.co.hu/csabi/drawing-text-performance-graphical-vs-console.html Milyen gyorsan lehet betuket a kepernyore irni? console, terminal, gdi, directx, vulkan, opengl, metal, opentk 2025-10-13 Drawing Text Isn't Simple: Benchmarking Console vs. Graphical Rendering console, terminal, gdi, directx, vulkan, opengl, metal, opentk 2025-10-13 Miert es hogyan hasznaljunk 3rd party libraryket frontend projektekben? frontend, library, 3rd party 2025-08-31 Heti gondolkodo 2025W31 weekly 2025-08-03 Heti gondolkodo 2025W30 weekly 2025-07-26 Kiszervezett gondolkodas ai 2025-07-04 Csinaljunk legacybol modern szoftvert, egy Angular frontend projekt elmenyei angular, frontend, legacy 2025-06-30 Miert utaljak az IT-sek a HR-eseket? hr, recruitment, it 2025-01-19 PHP kodminoseg fenntartas php, qa, static code checking, phpunit, phpcs, phpmd, phpstan, churn, phpdd, psalm, phplint, phan 2024-10-17 Failed: bson encoding error: BSON element key cannot contain null bytes mongo, mongodb, bson, null, key 2024-08-24 Nem bizol a kollegaidban? Akkor valamit rosszul csinalsz! bizalom vezetokent 2023-05-03 Dolgok, amikrol a programozok azt hiszik, hogy tudjak, de tevednek programozoi-tevhitek-falsehoods 2023-04-08 A programozoktol meg kell szabadulni chatgpt no-code low-code 2023-01-22 Miert fontosak a szemelyes adatok egyaltalan? privacyaware, privacy 2023-01-07 Egy tanmese a szereny, de tehetseges informatikusrol, akit en csak Gezanak hivok privacyaware, privacy 2023-01-02 Beskatulyaznad magad egy termekkel? Gondold at meg egyszer! learning, vendorlockin, risky 2022-12-11 Rekruterekrol es allasajanlatokrol bersav, recruiter, relevancia 2022-10-30 "A hidon akkor kell atmenni, amikor odaerunk." - YAGNI yagni, pagni 2022-10-17 "A lenyeg, hogy a munka keszen legyen!" agile, estimation, becsles, scrum, home office 2022-08-20 Munka vs. hivatas, a klasszikus dilemma hr, hobbi, munka, egyensuly, hivatas 2022-07-18 Miert nem fogok nalatok technikai interjun reszt venni? technikai interju, hr, recruit, leet code, coding challenge, take home challenge 2022-07-04 "Hogyan epitsek kapcsolati toket, ha karriert szeretnek valtani?" linkedin, tippek, trukkok 2022-06-10 Junior/Medior/Senior, hogyan merjuk? junior, medior, senior, hr, grade, level, experience 2022-05-09 11 tipp frontendeseknek, hogyan tegyek hatekonyabba a munkajukat frondend, vscode, angular 2021-10-31 Motion zoom - mozgas alapu keprekonstrukcio #52het 2021-06-01 Gesture Launcher #52het 2021-05-31 CellEvent, elso Android alkalmazasom #52het 2021-05-19 Notebookcheck, azaz hogyan valasszuk ki a legjobb ar-ertek aranyu eszkozt #52het 2021-05-18 Torrent multiplexer #52het 2021-05-17 Process watcher, logger #52het 2021-05-05 Lazy loading material dialog content lazy loading, angular, material, dialog 2020-12-28 Runtime configuration loading in Angular angular, runtime, configuration, settings, environment, production 2020-03-29 How to start an Angular project? angular 2020-03-11 Az 52 het projekt #52het 2020-01-01 Akkutoltottseg-jelzo #52het 2020-01-01 NetClub - Kollegiumi internetszolgaltato #52het 2019-12-31 DeeJayy - Lost Terminal #52het 2019-12-31 Counter Strike monitor #52het 2019-12-31 Kollegiumi CS bajnoksag 2005 #52het 2019-12-31 Mozgaserzekelos keprogzito, Camera Capture #52het 2019-12-30 Tobbszoros host pingelo #52het 2019-12-30 Savszelesseg mero, tesztelo #52het 2019-12-30 Generaljunk hamis adatokat #52het 2019-12-30 SQL lekerdezesek parancssorbol, odbc-vel #52het 2019-12-30 Nonogram generator (aka. "Fesse feketere") #52het 2019-12-30 Egyedi chat alkalmazas, kliens es szerver #52het 2019-12-29 FontSelector - betutipusvalaszto / font preview #52het 2019-12-28 Sajat halozati kommunikacios segedszoftver - sox #52het 2019-12-28 Csoportos e-mail kuldo szoftver Delphiben #52het 2019-12-28 Universal Api caller module for Angular 7-9 With NGRX state management Ngrx, API, Effects, HttpClient 2019-07-02 A leghosszabb projekt #52het 2019-04-19 Legelso kioszk projektem: Stari Sor Jukebox #52het 2019-02-28 BPM szamlalo #52het 2018-11-01 Assembly feleves beadandok #52het 2018-11-01 Chatbot before it was cool #52het 2018-10-30 StartX - Csereljuk ki a windows talcajat es a Start menut #52het 2018-10-28 What? - fajltipus azonosito #52het 2018-10-27 Transport Tycoon DirectX #52het 2018-10-26 Diff - fajlosszehasonlito #52het 2018-10-26 De Facto - Szoftverfelugyelet #52het 2018-10-25 CD es DVD katalogizalo #52het 2018-09-24 MP3 segedeszkozok #52het 2018-09-24 Keylogger - azaz billentyuleutes-figyelo es naplozo alkalmazas #52het 2018-08-29 Az orok projekt: szemelyes weboldal es blog #52het 2018-08-14 Szogyakorlo nyelvtanulashoz #52het 2018-08-13 Warzone 2100 mentett jatek szerkeszto #52het 2018-08-13 Rejtett Windows-beallitasokat konfiguralo program: TweakMaster #52het 2018-08-13 A DrotPostaGalamb levelezoprogram adatfajljainak dekodolasa #52het 2018-08-13 Privacy jegyzet 2018-07-30 Egy eve ilyenkor 2018-07-25 The Matrix - konzol szimulacio #52het 2018-07-13 Kakaoreceptkonyv kakao 2018-06-29 Crackeles! #52het 2018-06-22 A K.I.T.T. challenge #52het 2018-06-18 Doom 2 botokkal #52het 2018-06-16 Romi jatek Delphiben #52het 2018-06-09 MeetsCow & DeeJayy - Intro #52het 2018-06-09 Direct viewer - bitmap megjelenito #52het 2018-06-09 bazMAG #52het 2018-06-09 Console Vision - Konzolos ablakkezelo Delphiben #52het 2018-05-01 Quake 2 egy floppyn #52het 2018-04-20 Jatek-kitomoritok #52het 2018-04-12 Tetszoleges program elrejtese Windows talcarol #52het 2018-04-05 Szemelyre szabas #52het 2018-03-28 A year with Angular 5, 6 - Angular 2018 #angular5 #angular #resources #articles 2018-03-16 Az ikon evolucioja #52het 2018-03-14 Betutipusok #52het 2018-03-04 Billentyuzet-gyakorlo #52het 2018-02-28 Zenel is a DeeJayy? #52het 2018-02-22 Terkeprajzolo az Ascii 3D labirintushoz #52het 2018-02-19 Ascii 3D labyrinth #52het 2018-02-14 52 het - 52 projekt, avagy #eletem #52het 2018-02-14 Dockerezzunk virtualizalt kornyezetben! docker, xen, ubuntu 2017-11-12 A cloud-initramfs-copymods hatasai paravirtualizalt kornyezetben ubuntu, xen, copymods, docker, docker-ce, docker.io 2017-11-11 Virtualizaljunk Xen 4.6-tal Ubuntu 16-on (Xenial) ubuntu, xen, virtualizalas, hypervisor, debootstrap 2017-11-04 Allaskeresesem tortenete allaskereses, it, fejvadaszok, linkedin, job 2017-10-24 FAR Manager competitors far manager, file managers 2010-01-01 Blog blog 2001-01-02 Drawing Text on Screen - What Could Be Simpler? So, this all started because I decided to learn Go. Polyglots say the best way to learn one is by doing something fun with it. Some watch movies, some read, some play with flashcards, others just jump into deep water and start talking with zero vocabulary. I figured that logic should work for programming languages too - so I picked a fun target project: writing a text-based file manager. Think old-school Norton Commander or Dos Navigator. My personal favorite is still FAR Manager - it's insanely productive, still actively developed, and honestly the main reason I haven't switched to Linux or macOS yet. Anyway, FAR Manager's code is in a language I don't speak, and writing plugins wouldn't get me where I want, so... I decided to just rewrite the whole thing. Easy, right? I know it's ridiculous, but that's fine - I like big impossible projects. Aim for the Moon, etc. The Plan I won't spoil the full idea (still might build it), but I disclose these two main modules: 1. Input handling (keyboard, mouse) 2. Output handling (drawing text on screen) Let's skip the boring input stuff - it works, after wrestling with all the quirks of Windows' console mode. Long story short: the "modern" VT (Virtual Terminal) mode that Windows adopted from Linux is slower output and dumber input than the old API. It doesn't even tell you when Shift is pressed, only when you actually type an uppercase letter with it. Add in a few more edge cases like Ctrl+Alt+Shift chaos, and you get the idea. I found workarounds, though, so keyboard input is mostly done. Now, the fun part. Output: Drawing Text How hard can it be to draw letters on a screen, right? There are several ways to do it in the Windows console: * Old way: WriteConsoleOutputW - directly dump characters and color data to the screen. * New way: WriteConsoleW - embed color codes in the text (the VT way), richer (e.g. bold, italic, underline) The new one is half as fast. On a modern mid-range PC, that's just sad. So I looked for better options - maybe GPU acceleration? Some people pointed me to GPU-powered terminals with buttery-smooth rendering. Sounded good, so I dug deeper. After days of poking Go, forums, and LLMs, it became clear that Go is not made for things like this. So I switched to something battle-tested: C#. (And if anyone tells you "every language can do anything", please slap them with a large trout. I mean, sure - but at what cost?) C# means .NET, which can power full-blown 3D games, so drawing text should be child's play! I tried three rendering paths: 1. GDI - the classic Windows graphics interface. Works even "without" a GPU, so obviously not fast. 2. DirectX - the big guns, made for real-time 3D games. 3. Vulkan - similar to DirectX but cross-platform. I built a simple benchmark using all three plus the two console methods. The screen was 240x63 characters (Full HD with a 8x16 font). Test conditions were intentionally rough - every character with random colors - just to stress the system. [2025-10-14] Results (random colors everywhere) Renderer 240x63 80x25 WriteConsoleOutputW 20.3 64.5 WriteConsoleW 12.9 64.5 GDI 22.2 64.5 Vulkan 23.5 175.2 DirectX 17.6 130.5 All of them sucked, basically. Even with optimizations. But I measured the "optimistic" ways as well. Results (realistic: white on black) Renderer 240x63 80x25 WriteConsoleOutputW 64.5 64.5 WriteConsoleW 64.5 64.5 GDI 62.4 64.5 Vulkan 114.4 733.0 DirectX 140.2 944.5 Now we're talking. GPU rendering finally pays off - DirectX crushed it. A Different Angle Turns out the real bottleneck isn't the rendering API - it's Windows' font drawing (which is sadly CPU-bound). So I tried something unconventional: draw each character once, cache it as a texture, and then just copy those textures around. Copying pixels is much faster than redrawing fonts every frame. That alone gave a massive speed bump in stress test (random colors): Resolution DirectX + Texture 240x63 66.4 80x25 450.1 Nice jump - but there's a catch. The Catch Texturing looks great on paper, but you lose flexibility. You can't really optimize texture copies much more. On the other hand, writing text directly can be heavily optimized - for example, drawing an entire line at once when color and style match. That gives 5-7x speedups in practice. Resolution DX + text DX + texture Change 240x63 17.6 66.4 +377% (stress test) 80x25 130.5 450.1 +345% (stress test) 240x63 140.2 66.4 -47% (normal use) 80x25 944.5 450.1 -47% (normal use) So - caching helps in extreme cases, but slows things down in normal ones. Conclusion The sweet spot is DirectX + direct text drawing. It's fast enough, flexible, and still keeps the door open for fancier options like Vulkan if I ever go cross-platform. Moral of the story: Drawing text on screen isn't simple, most of the internet forums got the bottleneck wrong, only a selected few know what's really happening under the hood. blogshowcvcontact