Загрузка видео...
Не удалось загрузить видео
Just opened a 1,000,000-line SQL file. Smooth scroll. Full IntelliSense. Zero lag. Pure Rust 🦀 No Electron. No Tauri. Drops soon with Postgres 👇
50,442 просмотров • 2 месяцев назад •via X (Twitter)
Комментарии: 64

Gpui is insane, zed doing the lord’s work

YES 🙌

I don't think there is another editor that can do this

Why the F do you have a 1M line SQL file?

Valid reaction 😂 They do exist somewhere out there

Good to see people use the right technologies for such tools. Great job!

Thank you 🙏 gpui truly is insane

Legend! Nice moves!!

Thank you 🙏 Much appreciated

Looks performatively neat

Thank you 🙏

@AstraKernel Great work! GPUI definitely is great for such performance usecase. I have a question though, is GPUI better choice than Tauri for software like postman, accounting ?

@AstraKernel Thank you 🙏 If you are up for it, I would recommend using GPUI over Tauri. So many issues came out of Tauri for me, the current version available on the website is built with it

why would i switch to this from dbeaver?

DBeaver did this to me after trying to replicate the video

try opening in zed

I did, it struggles to keep up with highlighting (because treesitter) and also there is no good autocomplete for SQL anywhere but in SQL Studio & DataGrip. It's not a fair comparison

这也太丝滑了,这就去试试

Thank you! The version seen in the video isn't out yet but will be soon :)

Can feel Zed's UI library from a mile away

GPUI for the win 🏆

@late4nothing Any GPUI framworks you favor? I've seen a lot come from Zed's, like

@late4nothing I made my own, but if I were to use one I would make sure it is unstyled

excited for this cuz i look at sql dumps often lol

a million lines with intellisense and no lag is the demo that matters. that is exactly where electron editors fall over.

Very true, though most people won't have files this big or bigger - keeping it smooth ensures any workload will be

gpui?

Yes 🙌

Que sea Rust nativo sin webview es justo lo que deja virtualizar el render y mover un millón de líneas sin lag.

Very true in this case 🙌

The real test for a SQL editor at this scale isn't rendering, it's whether it can run EXPLAIN ANALYZE on a query against a huge Postgres table and keep the UI responsive while the plan comes back. Curious if streams query results incrementally or waits for the full result set before painting.

who has 1M lines sql file?

Me and many others (most likely) 🙌

million-line rendering is easier than keeping incremental parsing fast after edits

Very true, mine does both 🙌

did you move to gpui by any chance?

Yep 👍

crazy 🫡

What’s are performance numbers like on the file system (and disk if you’re using HDD)? Naiively, I would think this has the ability to trigger a lot of syscall activity upon frequent abrupt cursor pos changes. Should apply to Sublime Text similarly though.

Cursor moves and typing don't hit disk. The file is already in memory. Disk only comes into play on open/save

gpui?

Yes 🙏

It's too good, had to rewrite in it once I built a nice UI library

Beautiful

Thank you 🙏

Been a fan since you put up the very first tweet for with only the email bar. It's the most beautiful UI I've ever used.

Thank you 🙏 it means a lot to me. The new version is completely redesigned and faster in every way. Excited for you to try it :)

By completely redesigned I mean improved btw it keeps the same soul

I'll update to newer version.

It will be out soon :)

1 Million Lines better not be lagging, or you actively do stuff you shouldn't be doing. This is also the absolute bare minimum.

It should be the bare minimum but editors usually can't keep up with this in many ways. Whether that be intelisense, syntax highlighting, or find & replace or all of them combined hahaha

Syntax highlighting is not that expensive if you don't need semantic information like in tree-sitter. Intellisense should be done through a fully separate thread anyway and also only has some information about hierarchy...

Are there plans for MySQL support?

Yes :)

wdym 1000000 SQL file

1 million lines, smooth and seamless just like 100 or 10 lines

GPUI I’m assuming? Seems like the new hype! Unfortunately can’t migrate @tryOctarine due to the editor becoming incompatible

@tryOctarine Yep 👍 it was a harsh migration but very worth it for me. Tauri was holding me back too much, once I prototyped with it I knew I had to continue

Why would you make a million line sql query anyways 😭

SQL dumps / autogenerated migrations, or some other reason. It's good to have an incremental parser / editor that is capable enough to handle any workload

alright makes sense, I remember digging through a migration in raw sql file once

没有AI,我们真的能处理得了1,000,000 行的 SQL 文件吗?如果有了AI,我们真的有必要处理1,000,000 行的 SQL 文件吗?

the trick with a million lines isn't rust specifically, it's never touching the whole file at once, virtualized rendering for what's visible plus a rope or piece table for edits. native mostly buys you a small constant factor on top. what's backing the intellisense at that size, incremental parse.
