geoserver / geofence

Advanced Authorization Manager for GeoServer
GNU General Public License v2.0
100 stars 55 forks source link

Performance issues with many roles #90

Open offtherailz opened 7 years ago

offtherailz commented 7 years ago

With many roles for a user, rules readings becomes slow.

With a getCapabilities request and many layers the response takes too much to be generated (around 28 seconds with a user with 20 roles, 200 layers).

Probably the bottle-neck is here, but not sure:

https://github.com/geoserver/geofence/blob/master/src/services/core/services-impl/src/main/java/org/geoserver/geofence/services/RuleReaderServiceImpl.java#L500

We have n_layers_published * n_roles_for_user queries.

i.e. 200 layer, 20 roles = 4000 queries

francescoventimiglia1 commented 5 years ago

Hi, has this issue been solved yet?

offtherailz commented 5 years ago

As far as I undrerstood this issue should be solved using a rule cache. @afabiani can you confirm ?

kikislater commented 9 months ago

2017 to 2024 and still issue ! With a rdbms backend it's better but will not solve totally the performance impact

etj commented 9 months ago

@kikislater any contribution is welcome!

kikislater commented 9 months ago

You already implement it in Geonode as a docker receipt. Furthermore I have notice that remote services as a layer could slow down GetCapabilities requests in Geonode ... That's the major impact that could slow down geofence