You are not logged in.

#276 2010-04-28 02:03:54

ElkMonster
Member
Registered: 2008-11-24
Posts: 27

Re: Ranger, a textbased filemanager

Thank you, I love it. smile

Offline

#277 2010-04-28 11:49:48

querido
Member
Registered: 2010-04-14
Posts: 1

Re: Ranger, a textbased filemanager

Thank you.
I had thought mc and vifm "owned" this space for all eternity.
Good work!

Offline

#278 2010-04-28 12:59:48

hut
Member
From: Hanover, Germany
Registered: 2010-03-12
Posts: 569
Website

Re: Ranger, a textbased filemanager

I wish ranger was faster though. I'm not sure if ranger is so slow because of python or because of my shitty algorithms. I hope it's the latter, it would mean that it's fixable.


"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users

Offline

#279 2010-04-28 13:44:37

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: Ranger, a textbased filemanager

hut wrote:

I wish ranger was faster though. I'm not sure if ranger is so slow because of python or because of my shitty algorithms. I hope it's the latter, it would mean that it's fixable.

would it be worth a try using coreutils as a backend? i used a pcmanfm version based on coreutils for a while and that performed pretty well. it saves you from a lot of lower level stuff too, so you can focus on interfacing and usability.


ᶘ ᵒᴥᵒᶅ

Offline

#280 2010-04-28 13:50:24

hut
Member
From: Hanover, Germany
Registered: 2010-03-12
Posts: 569
Website

Re: Ranger, a textbased filemanager

You mean using cp for copying, etc?
In fact, I'm working on that already on a seperate branch. Copying is three times faster that way but it's not stable yet.
Until then, you can use !cp -r %c . (or !d!cp -r %c . to run it in background).


"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users

Offline

#281 2010-04-28 14:26:40

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: Ranger, a textbased filemanager

hut wrote:

You mean using cp for copying, etc?
In fact, I'm working on that already on a seperate branch. Copying is three times faster that way but it's not stable yet.
Until then, you can use !cp -r %c . (or !d!cp -r %c . to run it in background).

yes basically for all file operations/listings etc., you could have a look in the pcmanfm svn for inspiration (not sure if that would help though).

in what other sense is ranger slow?

Last edited by litemotiv (2010-04-28 14:26:59)


ᶘ ᵒᴥᵒᶅ

Offline

#282 2010-04-28 14:48:01

hut
Member
From: Hanover, Germany
Registered: 2010-03-12
Posts: 569
Website

Re: Ranger, a textbased filemanager

litemotiv wrote:
hut wrote:

You mean using cp for copying, etc?
In fact, I'm working on that already on a seperate branch. Copying is three times faster that way but it's not stable yet.
Until then, you can use !cp -r %c . (or !d!cp -r %c . to run it in background).

yes basically for all file operations/listings etc., you could have a look in the pcmanfm svn for inspiration (not sure if that would help though).

in what other sense is ranger slow?

Well I'm mainly concerned about the >1 second startup time (on my machine), relatively slow directory loading and high memory usage. I didn't get to optimizing much yet.


"hut_" or "h00th00t" in irc.freenode.net #archlinux
Ranger Mailing List: https://lists.nongnu.org/mailman/listinfo/ranger-users

Offline

#283 2010-04-28 15:25:34

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: Ranger, a textbased filemanager

hut wrote:

Well I'm mainly concerned about the >1 second startup time (on my machine), relatively slow directory loading and high memory usage. I didn't get to optimizing much yet.

well it has to load python, a bunch of libs and parse the configs. i think with a framework like this you won't get startup much faster..

directory loading feels to me like it's testing/quering every item separately, the sound the hdd makes is a lot like when you're deleting a list of files. you could probably fix this by using 'ls' instead (or another listing function in python).

high memory i don't know, 6mb on start here, must be python...


ᶘ ᵒᴥᵒᶅ

Offline

#284 2010-04-29 01:24:21

gaunt
Member
Registered: 2009-12-13
Posts: 62

Re: Ranger, a textbased filemanager

As to slow directory loading, over here /usr/bin shows in less than a second, which is my test for FM lag.  I've got a relatively high end machine, but ranger is faster than thunar/pcmanfm were.  I know it doesn't help much, but on my end something's going right.

Offline

#285 2010-04-29 01:39:36

skottish
Forum Fellow
From: Here
Registered: 2006-06-16
Posts: 7,942

Re: Ranger, a textbased filemanager

gaunt wrote:

As to slow directory loading, over here /usr/bin shows in less than a second, which is my test for FM lag.  I've got a relatively high end machine, but ranger is faster than thunar/pcmanfm were.  I know it doesn't help much, but on my end something's going right.

Confirmed. pcmanfm took what felt like a long time to open that directory whereas with ranger I don't even notice.

Offline

#286 2010-04-29 08:26:29

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: Ranger, a textbased filemanager

my simple test is a directory with no files but with a number of subdirectories, pcman shows this almost instantly where ranger takes a while. easiest to compare on a slow drive (e.g. network, usb etc.). maybe ranger is also indexing the files of every subdir in this scenario?


ᶘ ᵒᴥᵒᶅ

Offline

#287 2010-04-29 10:41:07

JohannesSM64
Member
From: Norway
Registered: 2009-10-11
Posts: 623
Website

Re: Ranger, a textbased filemanager

Some benchmarks from my Phenom II:

» time ranger <<< :q
real: 0.13s user: 0.11s system: 0.01s CPU: 95% cmd: ranger <<< :q
» time ranger /usr/bin <<< :q
real: 0.25s user: 0.19s system: 0.04s CPU: 92% cmd: ranger /usr/bin <<< :q
» time ranger / <<< :q       
real: 0.13s user: 0.10s system: 0.02s CPU: 97% cmd: ranger / <<< :q
» time ls /usr/bin DN
real: 0.01s user: 0.00s system: 0.00s CPU: 56% cmd: ls --color /usr/bin &> /dev/null
» time ls /usr/bin
..
real: 0.02s user: 0.00s system: 0.01s CPU: 30% cmd: ls --color /usr/bin

Last edited by JohannesSM64 (2010-04-29 10:43:06)

Offline

#288 2010-04-29 11:08:57

eyolf
Member
From: Copenhagen
Registered: 2005-11-29
Posts: 339
Website

Re: Ranger, a textbased filemanager

Here are mine:

eyo:eyolf[~]% time ranger / <<< :q
ranger / <<< :q  0.42s user 0.04s system 92% cpu 0.489 total
eyo:eyolf[~]% time ranger /usr/bin <<< :q
ranger /usr/bin <<< :q  0.61s user 0.08s system 96% cpu 0.717 total
eyo:eyolf[~]% time ranger /etc <<< :q
ranger /etc <<< :q  0.55s user 0.06s system 94% cpu 0.647 total
eyo:eyolf[~]% time ranger ~/dokumenter <<< :q
ranger ~/dokumenter <<< :q  2.14s user 0.11s system 99% cpu 2.258 total
eyo:eyolf[~]% time ranger ~/mp3 <<< :q
ranger ~/mp3 <<< :q  2.16s user 0.12s system 97% cpu 2.343 total
eyo:eyolf[~]% time ranger ~/mp3/netshare <<< :q
ranger ~/mp3/netshare <<< :q  2.13s user 0.14s system 93% cpu 2.437 total
eyo:eyolf[~]% time ranger ~/mp3/netshare/04\ Klassisk <<< :q
ranger ~/mp3/netshare/04\ Klassisk <<< :q  2.26s user 0.12s system 86% cpu 2.759 total
eyo:eyolf[~]% time ranger ~/mp3/netshare/04\ Klassisk/Beethoven\ Lv/05\ Pianosonater/Goode\ R <<< :q
ranger ~/mp3/netshare/04\ Klassisk/Beethoven\ Lv/05\ Pianosonater/Goode\ R <<  2.49s user 0.14s system 75% cpu 3.500 total

~/mp3 isn't a very big folder, but it has the folder netshare in it, which is a symlink to a folder in a fs mounted through sshfs over a wireless connection.  Since there is virtually no difference in time between going to the mp3 folder and to the mounted subfolder, I guess the whole tree is checked in both cases, even though I have preview dirs turned off in the config file. Am I right?

Anyway, I find the figures decent: satisfactory but improveable. smile

Offline

#289 2010-04-30 19:46:08

ntness
Member
From: The World
Registered: 2009-12-29
Posts: 97

Re: Ranger, a textbased filemanager

When issuing the ! command is there a way to insert text from the clipboard? The usual combinations (shift + insert, middle click) don't work.


transcend to the fifth abode

Offline

#290 2010-04-30 20:11:15

JohannesSM64
Member
From: Norway
Registered: 2009-10-11
Posts: 623
Website

Re: Ranger, a textbased filemanager

You're doing something wrong. Ranger is a terminal program, and support for pasting in X terminals is up to the terminal, and there is no abstraction, the text is simply entered. So if shift+insert works at your shell prompt, it works in Ranger too.

Offline

#291 2010-04-30 20:35:26

ntness
Member
From: The World
Registered: 2009-12-29
Posts: 97

Re: Ranger, a textbased filemanager

Shift+insert works fine in shell. When I issue the ! command (to carry out a terminal task) and use shift+insert Ranger prints an "h" character instead of pasting my text. What is wrong in this equation?


transcend to the fifth abode

Offline

#292 2010-04-30 20:42:18

Dieter@be
Forum Fellow
From: Belgium
Registered: 2006-11-05
Posts: 2,001
Website

Re: Ranger, a textbased filemanager

JohannesSM64 wrote:

You're doing something wrong. Ranger is a terminal program, and support for pasting in X terminals is up to the terminal, and there is no abstraction, the text is simply entered. So if shift+insert works at your shell prompt, it works in Ranger too.

fwiw, applications can interact with the x clipboard/primary selection buffer too. i.e. vim can use the clipboard, which is quite convenient if your terminal only does primary selection.


< Daenyth> and he works prolifically
4 8 15 16 23 42

Offline

#293 2010-04-30 22:54:28

Army
Member
Registered: 2007-12-07
Posts: 1,784

Re: Ranger, a textbased filemanager

There's something I need to improve in my setup. I start ranger with

/usr/bin/urxvtc -e /usr/bin/ranger

via mod4+alt+e in my i3 setup. Then, for example, when I start a movie from within ranger, mplayer starts to playback, but as soon as I close ranger, mplayer is being killed. Is there a way to avoid this problem? It works fine if I start ranger manually in a terminal. Is the missing shell the issue here? As far as I know with a line like /usr/bin/urxvtc -e /usr/bin/ranger there's no zsh (which I use) being loaded, right?

Offline

#294 2010-05-01 08:02:32

Procyon
Member
Registered: 2008-05-07
Posts: 1,819

Re: Ranger, a textbased filemanager

@Army: does it help if you run mplayer with setsid (or two, setsid setsid mplayer ...)? or with &>/dev/null </dev/null

Offline

#295 2010-05-01 10:53:10

JohannesSM64
Member
From: Norway
Registered: 2009-10-11
Posts: 623
Website

Re: Ranger, a textbased filemanager

Dieter@be wrote:

fwiw, applications can interact with the x clipboard/primary selection buffer too. i.e. vim can use the clipboard, which is quite convenient if your terminal only does primary selection.

parcellite already syncs my clipboards, so no problem there. I know about vim's X selection interaction, and I use it frequently.

ntness wrote:

Ranger prints an "h" character instead of pasting my text.

You should have said that right away, instead of leaving us to guess what "doesn't work" means smile

I see the pasting "bug" in ranger now. I only get the first character. Is it because the text is entered too fast?

My biggest problem with ranger atm is that /var/abs/extra takes 5 seconds to load, but with plain ls it's instant. I see now that the ranger foo <<< :q test isn't reliable, since it quits before the directory has loaded. /usr/bin loads very quickly though (less than half a second)

Last edited by JohannesSM64 (2010-05-01 10:57:36)

Offline

#296 2010-05-01 12:22:02

Procyon
Member
Registered: 2008-05-07
Posts: 1,819

Re: Ranger, a textbased filemanager

JohannesSM64 wrote:

My biggest problem with ranger atm is that /var/abs/extra takes 5 seconds to load, but with plain ls it's instant.

Is that ls -l? The minimum comparison would at least have to stat every file to see if it is a directory.

Offline

#297 2010-05-01 12:55:30

JohannesSM64
Member
From: Norway
Registered: 2009-10-11
Posts: 623
Website

Re: Ranger, a textbased filemanager

Procyon wrote:
JohannesSM64 wrote:

My biggest problem with ranger atm is that /var/abs/extra takes 5 seconds to load, but with plain ls it's instant.

Is that ls -l? The minimum comparison would at least have to stat every file to see if it is a directory.

real: 0.05s user: 0.01s system: 0.01s CPU: 30% cmd: ls --color -lh /var/abs/extra
real: 0.07s user: 0.04s system: 0.03s CPU: 97% cmd: ls --color -lh -R /var/abs/extra &> /dev/null
real: 0.13s user: 0.04s system: 0.04s CPU: 61% cmd: ls --color -lh -R /var/abs/extra

Indeed, the last one included recursively outputting everything in /var/abs/extra and drawing everything in the terminal with an xft font. And it's still 38 times faster than loading /var/abs/extra in ranger.

Last edited by JohannesSM64 (2010-05-01 13:01:50)

Offline

#298 2010-05-01 12:55:40

golwin
Member
From: Germany, Aachen
Registered: 2009-03-12
Posts: 35

Re: Ranger, a textbased filemanager

Something small that might be useful:
Is it possible to display the file extension in the bottom bar along with the writing permissions, size, etc? As long file names get cut off, several files with identical, long file names but different file extensions are not distinguishable.


arch64 | awesome | screen | ranger | vim | cmus | weechat | bitlbee

Offline

#299 2010-05-01 13:28:12

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: Ranger, a textbased filemanager

golwin wrote:

Something small that might be useful:
Is it possible to display the file extension in the bottom bar along with the writing permissions, size, etc? As long file names get cut off, several files with identical, long file names but different file extensions are not distinguishable.

maybe a middle trim would be better for long filenames?

longfilena...lastxchars.ext

ᶘ ᵒᴥᵒᶅ

Offline

#300 2010-05-01 13:28:18

Army
Member
Registered: 2007-12-07
Posts: 1,784

Re: Ranger, a textbased filemanager

Procyon wrote:

@Army: does it help if you run mplayer with setsid (or two, setsid setsid mplayer ...)? or with &>/dev/null </dev/null

Where exactly am I supposed to change mplayer to be started like that? I don't really get the python code, I'm lucky enough to use exactly the applications hut already implemented in ranger.

By the way, it's no mplayer issue. Just to avoid misunderstandings. Opening e.g. pdf's in zathura or apvlv (I have yet to decide which one fits my needs more) results in the same behavior.

Offline

Board footer

Powered by FluxBB