Commit a58a56c
committed
Replace an O(n) lookup in LINQ query parsing by an O(1) one
The HQL generators registry already uses dictionaries to resolve
generators for methods found in LINQ expression. But some generators
do not declare statically their supported methods and instead have
to be queried with a loop on them for support of methods encountered
in the LINQ query.
The result of this lookup can be cached for avoiding calling this loop
again on the next query using the method.
If #1868 is merged, this change will compensate for #1868 causing up to
three such lookups by method.1 parent fe440a0 commit a58a56c
File tree
2 files changed
+16
-10
lines changed- src
- NHibernate.Test/Async/Hql
- NHibernate/Linq/Functions
2 files changed
+16
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1079 | 1079 | | |
1080 | 1080 | | |
1081 | 1081 | | |
1082 | | - | |
1083 | 1082 | | |
1084 | 1083 | | |
| 1084 | + | |
1085 | 1085 | | |
1086 | 1086 | | |
1087 | 1087 | | |
| |||
Lines changed: 15 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
| |||
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
13 | 17 | | |
14 | 18 | | |
15 | 19 | | |
| |||
69 | 73 | | |
70 | 74 | | |
71 | 75 | | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
80 | 85 | | |
81 | 86 | | |
82 | 87 | | |
| |||
112 | 117 | | |
113 | 118 | | |
114 | 119 | | |
| 120 | + | |
115 | 121 | | |
116 | 122 | | |
117 | 123 | | |
0 commit comments