id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	blockedby	blocking	branch_state	votes
3859	Rotating dash generates way too much output	egmont	andrew_b	"I have a directory containing 2 million files. Using `script` I recorded starting up `mc` (takes about 10 seconds) and then quitting immediately.

Without rotating dash, the resulting `typescript` file is around 4 kB. With rotating dash, it's about 2 MB. (This is with the default skin; with 256-color or 16M-color skins it's even more.)

`mc` shouldn't generate megabytes of traffic for such an eye candy. It might even cause severe usability problems over a slow network.

It's one thing that it keeps setting the foreground and background colors which could be optimized away, but it's probably not the right direction to start.

On another note, IMO the rotating dash doesn't look too nice. It spins crazily too fast.

What I have in mind:

Currently layout.c's rotate_dash() keeps the last state in a static variable, bumps it each time and draws the new shape.

Instead, the shape to be drawn should be taken from `g_get_monotonic_time()`, scaled to a few steps per second, modulo the number of phases to draw. Plus, the last drawn shape should be stored in a static variable and the new one only actually painted if it has changed.

This would result in a nicer look (spinning with a reasonable constant speed) and save significantly on the produced amount of data.

There are maybe one or two more places at the source where a rotating dash is presented, they should also be updated.

Let me know if you have any objection against this change. If not, I'll be happy to come up with a patch."	defect	closed	major	4.8.24	mc-core	master	fixed					merged	committed-master
