TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: Recommendations on trying to write a efficient text editor

1 pointsby error_saladalmost 3 years ago
For a while now, I've been writing a small text editor. The idea is that I have a basic mvp that I can add to here and there. Currently I'm writing it in c++ using SDL2 to render and using a doubly linked list of gap buffers to store the text. At the moment it's not as performant as I'd like it to be and I've been wondering if there's more efficient ways to store text and render it. Maybe my question sounds stupid, but is there lightweight libraries out there to render text and get keyboard input FAST? In the same vein, is there better more efficient ways of storing text other than using a linked list of gap buffers?

1 comment

__dalmost 3 years ago
I assume you've deliberately chosen not to use a rope structure for storing text? They're kinda the default for text editors.