<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/src/rt/rust_uv.cpp, branch perf-tmp</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=perf-tmp</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=perf-tmp'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2013-11-19T05:45:58+00:00</updated>
<entry>
<title>Move runtime files to C instead of C++</title>
<updated>2013-11-19T05:45:58+00:00</updated>
<author>
<name>Alex Crichton</name>
<email>alex@alexcrichton.com</email>
</author>
<published>2013-11-14T18:04:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=508b7b996e5d557ec1c49e1d11563ecf4fc9d287'/>
<id>urn:sha1:508b7b996e5d557ec1c49e1d11563ecf4fc9d287</id>
<content type='text'>
Explicitly have the only C++ portion of the runtime be one file with exception
handling. All other runtime files must now live in C and be fully defined in C.
</content>
</entry>
<entry>
<title>Another round of test fixes from previous commits</title>
<updated>2013-11-10T09:37:12+00:00</updated>
<author>
<name>Alex Crichton</name>
<email>alex@alexcrichton.com</email>
</author>
<published>2013-11-08T04:13:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=86a321b65dcc5253f61202b2fdaac41f275344ce'/>
<id>urn:sha1:86a321b65dcc5253f61202b2fdaac41f275344ce</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Update to the latest libuv</title>
<updated>2013-11-10T09:37:11+00:00</updated>
<author>
<name>Alex Crichton</name>
<email>alex@alexcrichton.com</email>
</author>
<published>2013-11-07T23:26:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=3a3eefc5c3ce95de3001d8ee830296345c2f6bc9'/>
<id>urn:sha1:3a3eefc5c3ce95de3001d8ee830296345c2f6bc9</id>
<content type='text'>
At this time, also point the libuv submodule to the official repo instead of my
own off to the side.

cc #10246
Closes #10329
</content>
</entry>
<entry>
<title>Work around bugs in 32-bit enum FFI</title>
<updated>2013-11-10T09:37:11+00:00</updated>
<author>
<name>Alex Crichton</name>
<email>alex@alexcrichton.com</email>
</author>
<published>2013-11-06T03:16:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=0df8b0057c8beaf108dfb34e53829b74fd2a7abc'/>
<id>urn:sha1:0df8b0057c8beaf108dfb34e53829b74fd2a7abc</id>
<content type='text'>
cc #10308
</content>
</entry>
<entry>
<title>Migrate uv timer bindings away from ~fn()</title>
<updated>2013-11-10T09:37:10+00:00</updated>
<author>
<name>Alex Crichton</name>
<email>alex@alexcrichton.com</email>
</author>
<published>2013-11-01T16:36:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=24b42234185427c5141b03103d8ce640538ba500'/>
<id>urn:sha1:24b42234185427c5141b03103d8ce640538ba500</id>
<content type='text'>
</content>
</entry>
<entry>
<title>uv: Remove lots of uv/C++ wrappers</title>
<updated>2013-11-10T09:37:10+00:00</updated>
<author>
<name>Alex Crichton</name>
<email>alex@alexcrichton.com</email>
</author>
<published>2013-11-03T18:39:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=30c885ea52458b361bb8f215c17c384743e6851a'/>
<id>urn:sha1:30c885ea52458b361bb8f215c17c384743e6851a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fill out the remaining functionality in io::file</title>
<updated>2013-11-03T23:15:42+00:00</updated>
<author>
<name>Alex Crichton</name>
<email>alex@alexcrichton.com</email>
</author>
<published>2013-10-30T06:31:07+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=f19d0833625c382c5d0a8868924cd4620335e659'/>
<id>urn:sha1:f19d0833625c382c5d0a8868924cd4620335e659</id>
<content type='text'>
This adds bindings to the remaining functions provided by libuv, all of which
are useful operations on files which need to get exposed somehow.

Some highlights:

* Dropped `FileReader` and `FileWriter` and `FileStream` for one `File` type
* Moved all file-related methods to be static methods under `File`
* All directory related methods are still top-level functions
* Created `io::FilePermission` types (backed by u32) that are what you'd expect
* Created `io::FileType` and refactored `FileStat` to use FileType and
  FilePermission
* Removed the expanding matrix of `FileMode` operations. The mode of reading a
  file will not have the O_CREAT flag, but a write mode will always have the
  O_CREAT flag.

Closes #10130
Closes #10131
Closes #10121
</content>
</entry>
<entry>
<title>Remove all blocking std::os blocking functions</title>
<updated>2013-11-03T23:15:42+00:00</updated>
<author>
<name>Alex Crichton</name>
<email>alex@alexcrichton.com</email>
</author>
<published>2013-10-26T00:04:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=9c1851019f1ef9511fa8731b8f1acb0796d1e97f'/>
<id>urn:sha1:9c1851019f1ef9511fa8731b8f1acb0796d1e97f</id>
<content type='text'>
This commit moves all thread-blocking I/O functions from the std::os module.
Their replacements can be found in either std::rt::io::file or in a hidden
"old_os" module inside of native::file. I didn't want to outright delete these
functions because they have a lot of special casing learned over time for each
OS/platform, and I imagine that these will someday get integrated into a
blocking implementation of IoFactory. For now, they're moved to a private module
to prevent bitrot and still have tests to ensure that they work.

I've also expanded the extensions to a few more methods defined on Path, most of
which were previously defined in std::os but now have non-thread-blocking
implementations as part of using the current IoFactory.

The api of io::file is in flux, but I plan on changing it in the next commit as
well.

Closes #10057
</content>
</entry>
<entry>
<title>Modify IoFactory's fs_mkdir, and add fs_rename</title>
<updated>2013-11-03T23:15:41+00:00</updated>
<author>
<name>Alex Crichton</name>
<email>alex@alexcrichton.com</email>
</author>
<published>2013-10-25T23:50:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=7bf58c2baaac3f7cb3c8e8d735b27ac9e7d3cd78'/>
<id>urn:sha1:7bf58c2baaac3f7cb3c8e8d735b27ac9e7d3cd78</id>
<content type='text'>
The invocation for making a directory should be able to specify a mode to make
the directory with (instead of defaulting to one particular mode). Additionally,
libuv and various OSes implement efficient versions of renaming files, so this
operation is exposed as an IoFactory call.
</content>
</entry>
<entry>
<title>Cache and buffer stdout per-task for printing</title>
<updated>2013-10-25T17:31:57+00:00</updated>
<author>
<name>Alex Crichton</name>
<email>alex@alexcrichton.com</email>
</author>
<published>2013-10-25T00:30:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=e8f72c38f4bf74e7291043917fdd0bae1404b407'/>
<id>urn:sha1:e8f72c38f4bf74e7291043917fdd0bae1404b407</id>
<content type='text'>
Almost all languages provide some form of buffering of the stdout stream, and
this commit adds this feature for rust. A handle to stdout is lazily initialized
in the Task structure as a buffered owned Writer trait object. The buffer
behavior depends on where stdout is directed to. Like C, this line-buffers the
stream when the output goes to a terminal (flushes on newlines), and also like C
this uses a fixed-size buffer when output is not directed at a terminal.

We may decide the fixed-size buffering is overkill, but it certainly does reduce
write syscall counts when piping output elsewhere. This is a *huge* benefit to
any code using logging macros or the printing macros. Formatting emits calls to
`write` very frequently, and to have each of them backed by a write syscall was
very expensive.

In a local benchmark of printing 10000 lines of "what" to stdout, I got the
following timings:

  when |  terminal   |  redirected
----------------------------------
before |  0.575s     |   0.525s
after  |  0.197s     |   0.013s
  C    |  0.019s     |   0.004s

I can also confirm that we're buffering the output appropriately in both
situtations. We're still far slower than C, but I believe much of that has to do
with the "homing" that all tasks due, we're still performing an order of
magnitude more write syscalls than C does.
</content>
</entry>
</feed>
