Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Nov 2015 11:05:55 +0100 (CET)
From:      =?ISO-8859-1?Q?Trond_Endrest=F8l?= <Trond.Endrestol@fagskolen.gjovik.no>
To:        "Eugene M. Zheganin" <emz@norma.perm.ru>
Cc:        FreeBSD <freebsd-stable@freebsd.org>
Subject:   Re: zfs, mc, mcview and files opening
Message-ID:  <alpine.BSF.2.20.1511101102340.22820@mail.fig.ol.no>
In-Reply-To: <5641BFC8.9050207@norma.perm.ru>
References:  <5641BFC8.9050207@norma.perm.ru>

next in thread | previous in thread | raw e-mail | index | archive | help
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.      |
+-------------------------------+------------------------------------+
From owner-freebsd-stable@freebsd.org  Tue Nov 10 10:29:12 2015
Return-Path: <owner-freebsd-stable@freebsd.org>
Delivered-To: freebsd-stable@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 709CFA2B4E4
 for <freebsd-stable@mailman.ysv.freebsd.org>;
 Tue, 10 Nov 2015 10:29:12 +0000 (UTC)
 (envelope-from trond@fagskolen.gjovik.no)
Received: from smtp.fagskolen.gjovik.no (smtp.fagskolen.gjovik.no
 [IPv6:2001:700:1100:1:200:ff:fe00:b])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client CN "smtp.fagskolen.gjovik.no",
 Issuer "Fagskolen i Gj??vik" (not verified))
 by mx1.freebsd.org (Postfix) with ESMTPS id DC5771A9F
 for <freebsd-stable@freebsd.org>; Tue, 10 Nov 2015 10:29:11 +0000 (UTC)
 (envelope-from trond@fagskolen.gjovik.no)
Received: from mail.fig.ol.no (localhost [127.0.0.1])
 by mail.fig.ol.no (8.15.2/8.15.2) with ESMTPS id tAAAT6iE069417
 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO);
 Tue, 10 Nov 2015 11:29:06 +0100 (CET)
 (envelope-from trond@fagskolen.gjovik.no)
Received: from localhost (trond@localhost)
 by mail.fig.ol.no (8.15.2/8.15.2/Submit) with ESMTP id tAAAT6lw069414;
 Tue, 10 Nov 2015 11:29:06 +0100 (CET)
 (envelope-from trond@fagskolen.gjovik.no)
X-Authentication-Warning: mail.fig.ol.no: trond owned process doing -bs
Date: Tue, 10 Nov 2015 11:29:06 +0100 (CET)
From: =?ISO-8859-1?Q?Trond_Endrest=F8l?= <Trond.Endrestol@fagskolen.gjovik.no>
Sender: Trond.Endrestol@fagskolen.gjovik.no
To: "Eugene M. Zheganin" <emz@norma.perm.ru>
cc: FreeBSD <freebsd-stable@freebsd.org>
Subject: Re: zfs, mc, mcview and files opening
In-Reply-To: <alpine.BSF.2.20.1511101102340.22820@mail.fig.ol.no>
Message-ID: <alpine.BSF.2.20.1511101116480.22820@mail.fig.ol.no>
References: <5641BFC8.9050207@norma.perm.ru>
 <alpine.BSF.2.20.1511101102340.22820@mail.fig.ol.no>
User-Agent: Alpine 2.20 (BSF 67 2015-01-07)
Organization: Fagskolen Innlandet
OpenPGP: url=http://fig.ol.no/~trond/trond.key
MIME-Version: 1.0
X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED, AWL autolearn=ham
 autolearn_force=no version=3.4.1
X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on mail.fig.ol.no
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8BIT
X-Content-Filtered-By: Mailman/MimeDel 2.1.20
X-BeenThere: freebsd-stable@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: Production branch of FreeBSD source code <freebsd-stable.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/freebsd-stable>, 
 <mailto:freebsd-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-stable/>;
List-Post: <mailto:freebsd-stable@freebsd.org>
List-Help: <mailto:freebsd-stable-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/freebsd-stable>,
 <mailto:freebsd-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 10 Nov 2015 10:29:12 -0000

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.      |
+-------------------------------+------------------------------------+
From owner-freebsd-stable@freebsd.org  Tue Nov 10 11:54:54 2015
Return-Path: <owner-freebsd-stable@freebsd.org>
Delivered-To: freebsd-stable@mailman.ysv.freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1276EA2B77C
 for <freebsd-stable@mailman.ysv.freebsd.org>;
 Tue, 10 Nov 2015 11:54:54 +0000 (UTC)
 (envelope-from emz@norma.perm.ru)
Received: from elf.hq.norma.perm.ru (unknown [IPv6:2a00:7540:1::5])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client CN "mail.norma.perm.ru",
 Issuer "Vivat-Trade UNIX Root CA" (not verified))
 by mx1.freebsd.org (Postfix) with ESMTPS id 7A1E61236
 for <freebsd-stable@freebsd.org>; Tue, 10 Nov 2015 11:54:53 +0000 (UTC)
 (envelope-from emz@norma.perm.ru)
Received: from bsdrookie.norma.com. (pc233031.norma.com [IPv6:fd00::7fa] (may
 be forged))
 by elf.hq.norma.perm.ru (8.14.9/8.14.9) with ESMTP id tAABsj8r029238
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO)
 for <freebsd-stable@freebsd.org>; Tue, 10 Nov 2015 16:54:46 +0500 (YEKT)
 (envelope-from emz@norma.perm.ru)
Subject: Re: zfs, mc, mcview and files opening
To: freebsd-stable@freebsd.org
References: <5641BFC8.9050207@norma.perm.ru>
 <alpine.BSF.2.20.1511101102340.22820@mail.fig.ol.no>
From: "Eugene M. Zheganin" <emz@norma.perm.ru>
Message-ID: <5641DB05.7050209@norma.perm.ru>
Date: Tue, 10 Nov 2015 16:54:45 +0500
User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101
 Thunderbird/38.1.0
MIME-Version: 1.0
In-Reply-To: <alpine.BSF.2.20.1511101102340.22820@mail.fig.ol.no>
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: 8bit
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3
 (elf.hq.norma.perm.ru [IPv6:fd00::30a]);
 Tue, 10 Nov 2015 16:54:46 +0500 (YEKT)
X-Spam-Status: No hits=-100.2 bayes=0.0000 testhits AWL=0.214,BAYES_00=-1.9,
 RDNS_NONE=0.793,SPF_SOFTFAIL=0.665,USER_IN_WHITELIST=-100 autolearn=no
 autolearn_force=no version=3.4.0
X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on elf.hq.norma.perm.ru
X-BeenThere: freebsd-stable@freebsd.org
X-Mailman-Version: 2.1.20
Precedence: list
List-Id: Production branch of FreeBSD source code <freebsd-stable.freebsd.org>
List-Unsubscribe: <https://lists.freebsd.org/mailman/options/freebsd-stable>, 
 <mailto:freebsd-stable-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-stable/>;
List-Post: <mailto:freebsd-stable@freebsd.org>
List-Help: <mailto:freebsd-stable-request@freebsd.org?subject=help>
List-Subscribe: <https://lists.freebsd.org/mailman/listinfo/freebsd-stable>,
 <mailto:freebsd-stable-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Tue, 10 Nov 2015 11:54:54 -0000

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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.20.1511101102340.22820>