beagle r4514 - in branches/beagle-lucene2_1/beagled/Lucene.Net: Index upstream-changes
- From: dbera svn gnome org
- To: svn-commits-list gnome org
- Subject: beagle r4514 - in branches/beagle-lucene2_1/beagled/Lucene.Net: Index upstream-changes
- Date: Fri, 22 Feb 2008 00:14:09 +0000 (GMT)
Author: dbera
Date: Fri Feb 22 00:14:09 2008
New Revision: 4514
URL: http://svn.gnome.org/viewvc/beagle?rev=4514&view=rev
Log:
Add old patch 10_fewer-exceptions.patch
Added:
branches/beagle-lucene2_1/beagled/Lucene.Net/upstream-changes/05_fewer-exceptions.patch
Modified:
branches/beagle-lucene2_1/beagled/Lucene.Net/Index/FieldInfos.cs
Modified: branches/beagle-lucene2_1/beagled/Lucene.Net/Index/FieldInfos.cs
==============================================================================
--- branches/beagle-lucene2_1/beagled/Lucene.Net/Index/FieldInfos.cs (original)
+++ branches/beagle-lucene2_1/beagled/Lucene.Net/Index/FieldInfos.cs Fri Feb 22 00:14:09 2008
@@ -231,16 +231,9 @@
public int FieldNumber(System.String fieldName)
{
- try
- {
- FieldInfo fi = FieldInfo(fieldName);
- if (fi != null)
- return fi.number;
- }
- catch (System.IndexOutOfRangeException ioobe)
- {
- return - 1;
- }
+ FieldInfo fi = FieldInfo(fieldName);
+ if (fi != null)
+ return fi.number;
return - 1;
}
@@ -349,4 +342,4 @@
}
}
}
-}
\ No newline at end of file
+}
Added: branches/beagle-lucene2_1/beagled/Lucene.Net/upstream-changes/05_fewer-exceptions.patch
==============================================================================
--- (empty file)
+++ branches/beagle-lucene2_1/beagled/Lucene.Net/upstream-changes/05_fewer-exceptions.patch Fri Feb 22 00:14:09 2008
@@ -0,0 +1,35 @@
+From: Daniel Drake <dsd gentoo org>
+
+Exception handling is expensive, lets avoid it where possible.
+
+Index: Index/FieldInfos.cs
+===================================================================
+--- Index/FieldInfos.cs (revision 4506)
++++ Index/FieldInfos.cs (working copy)
+@@ -231,16 +231,9 @@
+
+ public int FieldNumber(System.String fieldName)
+ {
+- try
+- {
+- FieldInfo fi = FieldInfo(fieldName);
+- if (fi != null)
+- return fi.number;
+- }
+- catch (System.IndexOutOfRangeException ioobe)
+- {
+- return - 1;
+- }
++ FieldInfo fi = FieldInfo(fieldName);
++ if (fi != null)
++ return fi.number;
+ return - 1;
+ }
+
+@@ -349,4 +342,4 @@
+ }
+ }
+ }
+-}
+\ No newline at end of file
++}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]