Robert Collins wrote:
> I recall subprocess being very slow to import; it worries me that we'll
> be importing it all the time.
>
> A quick check on my machine took about 10ms to import, so its definitely
> noticable.
>
> -Rob
>
It can pretty easily be moved into the lazy_import section.
Also, this doesn't handle stuff like Unicode filenames that are valid on
disk, but not valid in user encoding. (Which can be pretty easy to
trigger on Windows.)
However, it is probably better than what we have today.
Actually, we have a different problem. In that 'get_user_encoding()' !=
'sys.get_filesystemencoding'. I'm not 100% sure what needs to be passed
to programs.
The real fix is to use CreateProcessW and pass it a unicode string,
rather than trying to get everything round-tripped across an encoding
barrier.
This may be a stepping point in that direction, though.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Robert Collins wrote:
> I recall subprocess being very slow to import; it worries me that we'll
> be importing it all the time.
>
> A quick check on my machine took about 10ms to import, so its definitely
> noticable.
>
> -Rob
>
It can pretty easily be moved into the lazy_import section.
Also, this doesn't handle stuff like Unicode filenames that are valid on
disk, but not valid in user encoding. (Which can be pretty easy to
trigger on Windows.)
However, it is probably better than what we have today.
Actually, we have a different problem. In that 'get_user_ encoding( )' != filesystemencod ing'. I'm not 100% sure what needs to be passed
'sys.get_
to programs.
The real fix is to use CreateProcessW and pass it a unicode string,
rather than trying to get everything round-tripped across an encoding
barrier.
This may be a stepping point in that direction, though.
John
=:->
-----BEGIN PGP SIGNATURE----- enigmail. mozdev. org/
+9AQACgkQJdeBCY SNAANcDACeMCCHc SVntHnO3XkvWLzC j82R t4Z0W+C64WG59gP Wo
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://
iEYEARECAAYFAkt
H2IAoMGFEiBOXh+
=6JUh
-----END PGP SIGNATURE-----