Closed kroppt closed 4 years ago
In the -perf flag to see performance metrics, it is useful to see the average time to render different components on the screen per frame, but for something like the MapString function in font.go, seeing the average run time lacks the context of how many times per frame it is being called, so seeing PERF 2020/07/19 12:42:10.809583 perf.go:54: - font.MapString = 1.029µs
doesn't mean much. Thoughts on adding # of calls per frame? This would affect buttons too, because there are multiple of them... might be a good idea to add # of calls for each
Also maybe total computation time per frame, and compare that to fps and log a warning if the computation time exceeds the frame time
Thoughts on just making the option of launching with a file name just be a flag like -file <name>
? Right now if you get the order wrong like ./tabula-editor.exe happyhug.png -fps 60
it will just start and ignore the flags because they aren't in the right order without warning you.
The refresh rate range seems to be coming up with a strange lower bound for me:
WARN 2020/08/07 11:49:45 framerate 60 not within set refresh rate range 144-144
Why wouldn't I be able to go lower than 144?
The refresh rate range seems to be coming up with a strange lower bound for me:
WARN 2020/08/07 11:49:45 framerate 60 not within set refresh rate range 144-144
Why wouldn't I be able to go lower than 144?
The range represents the minimum to maximum refresh rates of all the monitors. So a 60hz and 144hz monitor would have the range 60-144. I haven't really been able to test it, though. It's just a warning, so you can do it without anything breaking. You can interpret the warning as, "I set my framerate to a value lower than what my refresh rate is," which is frowned upon. Maybe we can have a way to align these automatically.
If you use the fps flag with a value equal to or less than 0, the program crashes: