Erwan Ropartz (
https://osgeo-org.atlassian.net/secure/ViewProfile.jspa?accountId=5cc013af7742d70ffbc78a9f
) *created* an issue
GeoServer (
https://osgeo-org.atlassian.net/browse/GEOS?atlOrigin=eyJpIjoiNDMyMTExYzM2Mjc1NDRmY2E3NjQxOTI0ZWNiNDA5MTAiLCJwIjoiaiJ9
) / Bug (
https://osgeo-org.atlassian.net/browse/GEOS-10725?atlOrigin=eyJpIjoiNDMyMTExYzM2Mjc1NDRmY2E3NjQxOTI0ZWNiNDA5MTAiLCJwIjoiaiJ9
) GEOS-10725 (
https://osgeo-org.atlassian.net/browse/GEOS-10725?atlOrigin=eyJpIjoiNDMyMTExYzM2Mjc1NDRmY2E3NjQxOTI0ZWNiNDA5MTAiLCJwIjoiaiJ9
) [WFS] : GetFeature Performance with jdbc plugin (
https://osgeo-org.atlassian.net/browse/GEOS-10725?atlOrigin=eyJpIjoiNDMyMTExYzM2Mjc1NDRmY2E3NjQxOTI0ZWNiNDA5MTAiLCJwIjoiaiJ9
)
Issue Type: Bug Affects Versions: 2.22-RC Assignee: Unassigned Components: WFS
Created: 27/Oct/22 4:52 PM Priority: Medium Reporter: Erwan Ropartz (
https://osgeo-org.atlassian.net/secure/ViewProfile.jspa?accountId=5cc013af7742d70ffbc78a9f
)
WFS request with a massive attribute filter (1000 PropertyIsEqual for example)
is slower when jdbc config is enabled
For example in our environment:
* Geoserver with config in datadir : 2s
* Geoserver with config in database : 27s
After some analysis, this difference is made by the catalognamespacesupport
that not used the jdbc cache to load namespaces
* The property name is parsed with Geotools :
*
//org.geotools.filter.v2_0.bindings.PropertyNameTypeBinding
if (factory instanceof FilterFactory2) {
return factory.property(
propertyName.getPropertyName(),
GML3EncodingUtils.copyNamespaceSupport(namespaceSupport));
}
* GML3EncodingUtils load all prefixes with the namespace support (line 3)
*
public static NamespaceSupport copyNamespaceSupport(NamespaceSupport
namespaceSupport) {
NamespaceSupport copy = new NamespaceSupport();
Enumeration prefixes = namespaceSupport.getPrefixes();
while (prefixes.hasMoreElements()) {
String prefix = (String) prefixes.nextElement();
String uri = namespaceSupport.getURI(prefix);
copy.declarePrefix(prefix, uri);
}
// the above did not cover the default prefix
String defaultUri = namespaceSupport.getURI("");
if (defaultUri != null) {
copy.declarePrefix("", defaultUri);
}
return copy;
}
* The catalogNamespace support use method list to load prefixes. This method
not use the cache in jdbcconfig
*
public Enumeration getPrefixes() {
@SuppressWarnings("PMD.CloseResource") // best effort closing
final CloseableIterator<NamespaceInfo> it =
catalog.list(NamespaceInfo.class, Predicates.acceptAll());
}
Pull request in progress
(
https://osgeo-org.atlassian.net/browse/GEOS-10725#add-comment?atlOrigin=eyJpIjoiNDMyMTExYzM2Mjc1NDRmY2E3NjQxOTI0ZWNiNDA5MTAiLCJwIjoiaiJ9
) Add Comment (
https://osgeo-org.atlassian.net/browse/GEOS-10725#add-comment?atlOrigin=eyJpIjoiNDMyMTExYzM2Mjc1NDRmY2E3NjQxOTI0ZWNiNDA5MTAiLCJwIjoiaiJ9
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira.core&referrer=utm_source%3DNotificationLink%26utm_medium%3DEmail
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=EmailNotificationLink&mt=8
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100209-
sha1:d23b292 )
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel