From: Tetsu Soh Date: 2010-01-21T19:36:41+09:00 Subject: [ruby-core:27656] A patch to rdoc --000e0cd1388cede4be047daa3408 Content-Type: multipart/alternative; boundary=000e0cd1388cede4b2047daa3406 --000e0cd1388cede4b2047daa3406 Content-Type: text/plain; charset=ISO-8859-1 Hello everyone, I made a patch to rdoc -- just 3 lines -- which makes the rdoc(generating html) run faster and use less memory. I listed the test result in the below. (Tested on 32 bits Linux, Ruby1.9.2-trunk, 4GB memory, Intel Quad 2.6GHz) Using rdoc to process whole lib directory: original : 15 minutes, 1.3GB memory patched: 7 minutes, 65MB memory I compared the generated results(patched and unpatched) using "diff -r" command, and confirmed that the patch does not break anything. I attached the patch file, please check it out. However, I only profiled rdoc with html output and found the problem. So I am not sure whether or not other output format code has similar problem. BTW, I found the *bug* using a memory profiler I created for Ruby1.9. Right now, the memory profiler can show how many live instances for each class, size and age(survived from how many times of GC) of each instance, alos can show the allocation call trace of each instance. However, I am still working on it. So, if you have interest on the memory profiler, you can contact me. Best regards, -Tetsu --000e0cd1388cede4b2047daa3406 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hello everyone,
=A0
I made a patch to rdo= c -- just 3=20 lines -- which makes the rdoc(generating html) run faster and use less=20 memory.
I listed the test result in the below.

(Tested on 32 bits Linux,=20 Ruby1.9.2-trunk, 4GB memory, Intel Quad 2.6GHz)
Using rdoc to process wh= ole=20 lib directory:
original : 15 minutes, 1.3GB memory
patched: 7 minutes= ,=20 65MB memory
=A0
I compared the generated results(patched and unpatche= d)=20 using "diff -r" command,
and confirmed that the patch does not= break=20 anything.
=A0
I attached the patch file, please check it out.
Howe= ver, I=20 only profiled rdoc with html output and found the problem.
So I am not s= ure=20 whether or not other output format code has similar problem.
=A0
BTW,= I=20 found the *bug* using a memory profiler I created for Ruby1.9.
Right now= , the=20 memory profiler can show how many live instances for each class,=A0 size=20 and
age(survived from how many times of GC) of each instance, alos can s= how=20 the allocation call trace of each instance.
However, I am still working = on=20 it.
So, if you have interest on the memory profiler, you can contact=20 me.
=A0
Best regards,
-Tetsu
--000e0cd1388cede4b2047daa3406-- --000e0cd1388cede4be047daa3408 Content-Type: application/octet-stream; name="rdoc.patch" Content-Disposition: attachment; filename="rdoc.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_g4pek1s70 SW5kZXg6IGxpYi9yZG9jL2dlbmVyYXRvci9odG1sLnJiCj09PT09PT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIGxpYi9yZG9j L2dlbmVyYXRvci9odG1sLnJiCShyZXZpc2lvbiAyNjM2NykKKysrIGxpYi9yZG9jL2dlbmVyYXRv ci9odG1sLnJiCSh3b3JraW5nIGNvcHkpCkBAIC0yMzEsNiArMjMxLDEwIEBACiAgICAgICBvcGVu IG9wX2ZpbGUsICd3JyBkbyB8aW98CiAgICAgICAgIGl0ZW0ud3JpdGVfb24gaW8sIGZpbGVfbGlz dCwgY2xhc3NfbGlzdCwgbWV0aG9kX2xpc3QKICAgICAgIGVuZAorCisgICAgICBmaWxlX2xpc3Qu Y2xlYXIKKyAgICAgIGNsYXNzX2xpc3QuY2xlYXIKKyAgICAgIG1ldGhvZF9saXN0LmNsZWFyCiAg ICAgZW5kCiAgIGVuZAogCg== --000e0cd1388cede4be047daa3408--