Skip to content

Slow imports of XMLSchema? #983

Open
@beng-sjc

Description

@beng-sjc

Hello,

We currently use djangosaml2 as part of our workflow and have an external monitoring service, Sentry, to profile our application.

We've noticed that on every request to our app, the djangosaml2 library imports saml2 library which imports xmlschema and usually takes a long time. We are also following the recommended usage in urlpatterns.

I've attached a screenshot showing the profiling from Sentry and in the first frame the include takes 1.45s to do this step: re_path(r"^saml2/", include("djangosaml2.urls")) and another screenshot showing slow imports of XMLSchema by saml2. Unfortunately I had issues trying to upload a video of our profiling that might have made this easier to visualize.

Could the imports be optimized somehow? We can provide more details about our usage if needed.

Image Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions