зеркало из https://github.com/mono/mail-archives.git
187 строки
6.5 KiB
HTML
187 строки
6.5 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
|
<HTML>
|
|
<HEAD>
|
|
<TITLE> [Mono-bugs] [Bug 59537][Nor] Changed - improve NameTable performance
|
|
</TITLE>
|
|
<LINK REL="Index" HREF="index.html" >
|
|
<LINK REL="made" HREF="mailto:bugzilla-daemon%40bugzilla.ximian.com">
|
|
<META NAME="robots" CONTENT="index,nofollow">
|
|
|
|
<LINK REL="Previous" HREF="017103.html">
|
|
<LINK REL="Next" HREF="017105.html">
|
|
</HEAD>
|
|
<BODY BGCOLOR="#ffffff">
|
|
<H1>[Mono-bugs] [Bug 59537][Nor] Changed - improve NameTable performance
|
|
</H1>
|
|
<B>bugzilla-daemon@bugzilla.ximian.com
|
|
</B>
|
|
<A HREF="mailto:bugzilla-daemon%40bugzilla.ximian.com"
|
|
TITLE="[Mono-bugs] [Bug 59537][Nor] Changed - improve NameTable performance">bugzilla-daemon@bugzilla.ximian.com
|
|
</A><BR>
|
|
<I>Wed, 9 Jun 2004 12:07:36 -0400 (EDT)</I>
|
|
<P><UL>
|
|
<LI> Previous message: <A HREF="017103.html">[Mono-bugs] [Bug 59584][Min] Changed - (falha de segmentação) segmentation fault
|
|
</A></li>
|
|
<LI> Next message: <A HREF="017105.html">[Mono-bugs] [Bug 59537][Nor] Changed - improve NameTable performance
|
|
</A></li>
|
|
<LI> <B>Messages sorted by:</B>
|
|
<a href="date.html#17104">[ date ]</a>
|
|
<a href="thread.html#17104">[ thread ]</a>
|
|
<a href="subject.html#17104">[ subject ]</a>
|
|
<a href="author.html#17104">[ author ]</a>
|
|
</LI>
|
|
</UL>
|
|
<HR>
|
|
<!--beginarticle-->
|
|
<PRE>Please do not reply to this email- if you want to comment on the bug, go to the
|
|
URL shown below and enter your comments there.
|
|
|
|
Changed by <A HREF="mailto:atsushi@ximian.com.">atsushi@ximian.com.</A>
|
|
|
|
<A HREF="http://bugzilla.ximian.com/show_bug.cgi?id=59537">http://bugzilla.ximian.com/show_bug.cgi?id=59537</A>
|
|
|
|
--- shadow/59537 2004-06-09 10:52:46.000000000 -0400
|
|
+++ shadow/59537.tmp.32372 2004-06-09 12:07:36.000000000 -0400
|
|
@@ -273,6 +273,123 @@
|
|
|
|
------- Additional Comments From <A HREF="mailto:bmaurer@users.sf.net">bmaurer@users.sf.net</A> 2004-06-09 10:52 -------
|
|
Ok, atsushi's test case is not quite right. He does not take advantage
|
|
of the new impl that much. Basically, the problem is that we are not
|
|
querying on names that are already in the table -- every query in
|
|
eno's benchmark is unique. This is not how the code is designed.
|
|
+
|
|
+------- Additional Comments From <A HREF="mailto:atsushi@ximian.com">atsushi@ximian.com</A> 2004-06-09 12:07 -------
|
|
+I know. That example is one extreme case (though I could even
|
|
+delete the second iteration of AddBatch()). I am not saying "look at
|
|
+this. existing implementations MUST be faster than new thing". That's
|
|
+not the point.
|
|
+
|
|
+But if you think that new implementation must be faster in practical
|
|
+case, I cannot agree, since I actually compared the performance data.
|
|
+
|
|
+Common to all the cases, the processing speed is almost the same.
|
|
+However, memory consumption is
|
|
+
|
|
+Example #1 : read large document that contains many identical names.
|
|
+
|
|
+using System;
|
|
+using System.Xml;
|
|
+
|
|
+public class Test
|
|
+{
|
|
+ public static void Main ()
|
|
+ {
|
|
+ XmlTextReader xtr = new XmlTextReader ("TestResult.xml");
|
|
+ while (!xtr.EOF)
|
|
+ xtr.Read ();
|
|
+ }
|
|
+}
|
|
+
|
|
+$ cp ~/cvs/mcs/class/System.Data/TestResult.xml . // example
|
|
+
|
|
+$ mono --profile test.exe > nt-perf-new.txt [-old.txt]
|
|
+
|
|
+// Old one
|
|
+Total time spent compiling 371 methods (sec): 0.07
|
|
+Slowest method to compile (sec): 0.01:
|
|
+System.Globalization.CultureInfo::ConstructCalendars()
|
|
+Time(ms) Count P/call(ms) Method name
|
|
+########################
|
|
+ 350.000 1 350.000
|
|
+System.Object::runtime_invoke_void(object,intptr,intptr,intptr)
|
|
+
|
|
+------
|
|
+Total memory allocated: 263 KB
|
|
+
|
|
+// new one
|
|
+Total time spent compiling 393 methods (sec): 0.06
|
|
+Slowest method to compile (sec): 0.01: System.IO.Path::GetFullPath(string)
|
|
+Time(ms) Count P/call(ms) Method name
|
|
+########################
|
|
+ 380.000 1 380.000
|
|
+System.Object::runtime_invoke_void(object,intptr,intptr,intptr)
|
|
+
|
|
+------
|
|
+Total memory allocated: 442 KB
|
|
+
|
|
+
|
|
+Example #2 : XSLT test performance
|
|
+
|
|
+$ cd mcs/class/System.XML/Test/System.Xml.Xsl/standalone_tests
|
|
+$ make test
|
|
+
|
|
+// Old one
|
|
+Total time spent compiling 2854 methods (sec): 0.542
|
|
+Slowest method to compile (sec): 0.011:
|
|
+System.Xml.XmlDocument::.ctor(XmlImplementation,XmlNameTable)
|
|
+Time(ms) Count P/call(ms) Method name
|
|
+########################
|
|
+ 425375.000 9307 45.705 Mono.Xml.Xsl.XslTransformProcessor::
|
|
+
|
|
+------
|
|
+Total memory allocated: 850815 KB
|
|
+
|
|
+
|
|
+// New one
|
|
+Total time spent compiling 2851 methods (sec): 0.43
|
|
+Slowest method to compile (sec): 0.01:
|
|
+System.Array::Copy(Array,int,Array,int,int)
|
|
+Time(ms) Count P/call(ms) Method name
|
|
+########################
|
|
+ 438493.000 9307 47.114 Mono.Xml.Xsl.XslTransformProcessor::
|
|
+
|
|
+------
|
|
+Total memory allocated: 854028 KB
|
|
+
|
|
+
|
|
+Example #3 - Other than those tests above, I also tried DataSet & XML
|
|
+tests (I've received from julia; that has 1.8MB of xml, with 50kb of
|
|
+schema), but its not reproducable on your side. Just attaching FYI;
|
|
+
|
|
+// Old one
|
|
+Total time spent compiling 1627 methods (sec): 0.33
|
|
+Slowest method to compile (sec): 0.03: I18N.Common.Handlers::.cctor()
|
|
+Time(ms) Count P/call(ms) Method name
|
|
+########################
|
|
+ 33035.000 11930 2.769
|
|
+System.Data.XmlDataReader::ReadElement(DataRow)
|
|
+
|
|
+------
|
|
+Total memory allocated: 12942 KB
|
|
+
|
|
+// New one
|
|
+Total time spent compiling 1624 methods (sec): 0.451
|
|
+Slowest method to compile (sec): 0.08:
|
|
+System.Xml.Schema.XmlSchemaSimpleTypeRestriction::Validate(ValidationEventHandler,XmlSchema)
|
|
+Time(ms) Count P/call(ms) Method name
|
|
+########################
|
|
+ 35599.000 11930 2.984
|
|
+System.Data.XmlDataReader::ReadElement(DataRow)
|
|
+
|
|
+------
|
|
+Total memory allocated: 17311 KB
|
|
+
|
|
+
|
|
+I have no intention to deny the possible case that the new
|
|
+implementation is faster, but cannot agree blindly without the
|
|
+concrete data.
|
|
+
|
|
|
|
</PRE>
|
|
<!--endarticle-->
|
|
<HR>
|
|
<P><UL>
|
|
<!--threads-->
|
|
<LI> Previous message: <A HREF="017103.html">[Mono-bugs] [Bug 59584][Min] Changed - (falha de segmentação) segmentation fault
|
|
</A></li>
|
|
<LI> Next message: <A HREF="017105.html">[Mono-bugs] [Bug 59537][Nor] Changed - improve NameTable performance
|
|
</A></li>
|
|
<LI> <B>Messages sorted by:</B>
|
|
<a href="date.html#17104">[ date ]</a>
|
|
<a href="thread.html#17104">[ thread ]</a>
|
|
<a href="subject.html#17104">[ subject ]</a>
|
|
<a href="author.html#17104">[ author ]</a>
|
|
</LI>
|
|
</UL>
|
|
</body></html>
|