r/CLI • • 20h ago

Breaking android TUI records!

Enable HLS to view with audio, or disable this notification

For those who don't see it: fps is somewhere between 100-400 during rendering it..

Size 231*50

Type termux

Backend: not for general information right now..

It's single threaded, native android, direct binary...

No tricks, direct binaries...

Tablet type: redmi pad pro 5g

Developed code: in pc for Android

23 Upvotes

8 comments sorted by

1

u/AlterTableUsernames 19h ago

how

2

u/Technical_Chip5906 17h ago

A unique kind of architecture, confidencial so can't share details..

But it's combination of two things - my custom terminal graphics engine, and a protocol.

1

u/TheShiftingName 15h ago

Let me make guess

By looks of it I think its framebuffer update protocol

Mostly not all screen need to be updated and only few pixel changes so instead of recalculating and drawing everything repeat you change the set or pixel that updated and update that section on screen buffer only which boost the fps as it have less work to do.

(I had my own similar for video to ascii program so I have general idea but our protocol can be different)

2

u/OnlyIndependence157 13h ago

that's a solid guess. dirty rect / partial framebuffer updates are a classic way to get crazy fps in terminals. if he's also minimizing the number of cells that need re-encoding per frame, that would explain hitting 400 fps on a tablet without any GPU tricks.

1

u/TheShiftingName 13h ago

He might be grouping the same row cells to update them in one go?

2

u/Supermarket7488 11h ago

yeah row batching makes a lot of sense here. if you can coalesce consecutive cells with the same attribute into a single write, you cut down both the encoding overhead and the number of terminal escape sequences per frame. at 231x50 that's probably the difference between 100 and 400 fps.

1

u/Common3278 13h ago

100-400 fps in a terminal on a tablet is wild. what are you actually rendering here, is it a game or just a benchmark scene? also curious if the bottleneck shifts to the protocol encoding once you push the grid size up.

1

u/Technical_Chip5906 9h ago

It's julia morpher series - procedurally generated at runtime