On Tue, 10 Nov 2015 14:58+0500, Eugene M. Zheganin wrote:> my midnight commander is terribly slow at vieweing files with mcview.[snip]> Can some workaround be used ?I blame file(1), it's hopelessly slow. mcview uses file(1) to deduce if it should just display the damn file or run the file through some filter. Maybe an option in mc/mcview to disable the use of file(1) is an acceptable compromise. OTOH, I could be wrong. -- +-------------------------------+------------------------------------+ | Vennlig hilsen, | Best regards, | | Trond Endrest?l, | Trond Endrest?l, | | IT-ansvarlig, | System administrator, | | Fagskolen Innlandet, | Gj?vik Technical College, Norway, | | tlf. mob. 952 62 567, | Cellular...: +47 952 62 567, | | sentralbord 61 14 54 00. | Switchboard: +47 61 14 54 00. | +-------------------------------+------------------------------------+
On Tue, 10 Nov 2015 11:05+0100, Trond Endrest?l wrote:> On Tue, 10 Nov 2015 14:58+0500, Eugene M. Zheganin wrote: > > > my midnight commander is terribly slow at vieweing files with mcview. > > [snip] > > > Can some workaround be used ? > > I blame file(1), it's hopelessly slow. mcview uses file(1) to deduce > if it should just display the damn file or run the file through some > filter. Maybe an option in mc/mcview to disable the use of file(1) is > an acceptable compromise.A workaround is to navigate to the file you wish to view. Hit M-! or ESC ! to activate the filter command. Hit the Home key, type in c a t followed by a space and hit enter. -- +-------------------------------+------------------------------------+ | Vennlig hilsen, | Best regards, | | Trond Endrest?l, | Trond Endrest?l, | | IT-ansvarlig, | System administrator, | | Fagskolen Innlandet, | Gj?vik Technical College, Norway, | | tlf. mob. 952 62 567, | Cellular...: +47 952 62 567, | | sentralbord 61 14 54 00. | Switchboard: +47 61 14 54 00. | +-------------------------------+------------------------------------+
Hi, on 10.11.2015 15:05, Trond Endrest?l wrote:> I blame file(1), it's hopelessly slow. mcview uses file(1) to deduce > if it should just display the damn file or run the file through some > filter. Maybe an option in mc/mcview to disable the use of file(1) is > an acceptable compromise.Yeah, you seem to be right. /usr/bin/time -h file /var/log/maillog gives same time of 37-40 seconds to process the file. The main answer is now why file(1) is that slow ? I tested it on files of about same size and UFS - there's no lag at all. Is it worth to report this in bugzilla ? Thanks. Eugene.