[Maya-Python] seqls: A tool for listing file sequences

2014-12-13 Thread Justin Israel
Hey all, This isn't directly python related, but I thought I would share anyways. If anyone has been using the python library fileseq , which I help maintain, to work with file sequence and frame range patterns, I've built a tool around this functionalit

Re: [Maya-Python] seqls: A tool for listing file sequences

2014-12-15 Thread Marcus Ottosson
I haven't used the Python library, but what would be the advantage(s) of a Go version compared with the Python version? On 13 December 2014 at 22:31, Justin Israel wrote: > Hey all, > > This isn't directly python related, but I thought I would share anyways. > If anyone has been using the python

Re: [Maya-Python] seqls: A tool for listing file sequences

2014-12-15 Thread Justin Israel
The Go version was getting about a 25x speedup when using FindSequencesOnDisk (which makes use of all of the other facilities) . The parsing and string building of the paths, frame ranges, and results are faster. I reuse buffers instead of constantly allocating new strings. Also the find operation

Re: [Maya-Python] seqls: A tool for listing file sequences

2014-12-15 Thread Marcus Ottosson
Sounds good, no benchmarks? On 15 December 2014 at 18:35, Justin Israel wrote: > The Go version was getting about a 25x speedup when using > FindSequencesOnDisk (which makes use of all of the other facilities) . The > parsing and string building of the paths, frame ranges, and results are > fast

Re: [Maya-Python] seqls: A tool for listing file sequences

2014-12-16 Thread Justin Israel
I can work up some benchmarks against the python fileseq. On Tue, 16 Dec 2014 8:57 PM Marcus Ottosson wrote: > Sounds good, no benchmarks? > > On 15 December 2014 at 18:35, Justin Israel > wrote: > >> The Go version was getting about a 25x speedup when using >> FindSequencesOnDisk (which makes

Re: [Maya-Python] seqls: A tool for listing file sequences

2014-12-16 Thread Justin Israel
Here are some benchmarks: https://gist.github.com/justinfx/9c07ce03693f03c4bc46 I don't have a case on hand to reproduce where my co-worker was getting a 25x speedup. I will have to see if I can find that. It was more a case of "what were you getting before? Ok what are you getting now?" :-) These

Re: [Maya-Python] seqls: A tool for listing file sequences

2014-12-16 Thread Anthony Tan
Wildish speculation on my part, I wouldn't be surprised if the go version of had a better equivalent implementation of the os.listdir() call giving you a lot of that speed up - esp if you're using NFS/CIFS - which would make the go version better-er even without implementing any swanky concurrency

Re: [Maya-Python] seqls: A tool for listing file sequences

2014-12-16 Thread Marcus Ottosson
Specifically, i’m thinking about PEP-471. https://www.python.org/dev/peps/pep-0471/ That’s some really interesting stuff! Looks like it’s available for 2.7 too. ​ On 16 December 2014 at 12:26, Anthony Tan wrote: > Wildish speculation on my part, I wouldn't be surprised if the go > version of h

Re: [Maya-Python] seqls: A tool for listing file sequences

2014-12-16 Thread Justin Israel
If you are curious, the source for Go's walk is here: https://golang.org/src/path/filepath/path.go#L389 It isn't quite what the python Pep describes, as it uses an lstat in combination with readdirnames. It also isn't really the fastest of walk implementations as some have pointed out. I'm actuall

Re: [Maya-Python] seqls: A tool for listing file sequences

2014-12-16 Thread Justin Israel
Oh woops. You were talking about the listdir impl in python. The equivalent is readdir, and here: https://golang.org/src/os/file_unix.go#L154 They are reading the names of the location and doing an lstat on each. On Wed, 17 Dec 2014 7:28 AM Justin Israel wrote: > If you are curious, the source

Re: [Maya-Python] seqls: A tool for listing file sequences

2014-12-16 Thread Anthony Tan
Hm, interesting, I'll definitely have to have a poke when I get some time - been looking for an excuse to do more Go but I can't justify any of it here at work. Homework! :D On Wed, Dec 17, 2014, at 05:52 AM, Justin Israel wrote: > Oh woops. You were talking about the listdir impl in python. The

Re: [Maya-Python] seqls: A tool for listing file sequences

2014-12-16 Thread Justin Israel
Seems like if I wanted to do what is proposed in that Pep, I would have to drop down to the platform specific syscalls. Although at least it is already working like a "generator" and streaming the listing on each subsequent call. On Wed, 17 Dec 2014 11:13 AM Anthony Tan wrote: > Hm, interesting

Re: [Maya-Python] seqls: A tool for listing file sequences

2014-12-16 Thread Justin Israel
This was an interesting tidbit I got from the Go mailing list, when I asked about the availability of the readdir system call directly in a generalized sense: http://man7.org/linux/man-pages/man3/readdir.3.html The only fields in the dirent structure that are mandated by POSIX.1 are: d_name[], of

Re: [Maya-Python] seqls: A tool for listing file sequences

2015-06-10 Thread Justin Israel
Hi All, If anyone has found my seqls tool useful for listing file sequences (and files), I have some new updates to announce since the 0.9.1 was first mentioned https://bintray.com/justinfx/utils/seqls/_latestVersion https://github.com/justinfx/gofileseq Changes: *1.0.0* cmd/seqls - Large