leostera / leostera/minttea

Configurable framerate and diff-rendering

Open
#46 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
OCaml
Stars
472
Forks
32
PR merge metrics
No merged PRs in 30d

Description

          @leostera This is awesome sauce! I think the situation has improved for me but not entirely.

I still see an issue from #34 but it happens not so frequently to me. Previously, I had to restart my app 7 times to avoid hanging. Now I need to restart it 7 times to observe hanging, which is an improvement!

At this point, I started thinking that my view function may generate lots of garbage, and the GC struggles to process everything at 60 FPS (default).

I wonder if Mint Tea can add something like has_diff : 'model -> 'model -> bool to t

https://github.com/leostera/minttea/blob/3e386136d315c60c16ea39b94789fbb7761003f5/minttea/app.ml#L1-L5

So that it can avoid calling view entirely if the model didn't change unlike the current implementation where we compare already rendered buffer:

https://github.com/leostera/minttea/blob/3e386136d315c60c16ea39b94789fbb7761003f5/minttea/renderer.ml#L26


Alternatively, exposing the fps setting from start may help app developers reduce their resource usage (I don't really need 60 fps)

https://github.com/leostera/minttea/blob/3e386136d315c60c16ea39b94789fbb7761003f5/minttea/minttea.ml#L9-L26

Originally posted by @chshersh in https://github.com/leostera/minttea/issues/38#issuecomment-2021312464

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with minttea/app.ml and minttea/renderer.ml at the linked locations to understand the current model and rendered-buffer comparisons, then inspect minttea/minttea.ml where start is defined. Clarify whether the intended result is model-based diffing, configurable FPS, or both; done means the selected behavior is exposed and prevents the reported rendering overhead.

Written by the indexing model from the issue text.

Assessment

Tech stack
ocaml
Domain
cli, performance
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.