On SDE on Oracle (and maybe other platforms) WFS queries against layers containing large numbers of features is very slow. This is because WFS requires computing the size of the query result before the query is executed to retrieve data. The SDE API method SEQuery.calculateTableStatistics currently used to do this is very slow (on Oracle at least).
A workaround is to run the query twice, once to count the features and once to fetch the data.
Note that due to an undocumented quirk of the SDE API, it is also necessary to call SEQuery.prepareQueryInfo before SEQuery.setSpatialConstraints. Otherwise, the spatial filter will not apply.