Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance requete et ecriture fichier #132

Closed
joelclems opened this issue May 10, 2023 · 1 comment
Closed

Performance requete et ecriture fichier #132

joelclems opened this issue May 10, 2023 · 1 comment
Assignees

Comments

@joelclems
Copy link
Contributor

joelclems commented May 10, 2023

Amélioration des performances

utilisation de yield_per(n) pour découper les requetes

  • taille n configurable ?

code actuel

module export

if self.export.geometry_field and EXPORT_FORMAT[format]["geofeature"]:
data = self.exportobject_query_definition.as_geofeature()
else:
data = self.exportobject_query_definition.return_query()

dépôt utils

https://github.com/PnX-SI/Utils-Flask-SQLAlchemy/blob/4a1d299100fa3076caab81b1274ae9750d37bd9c/src/utils_flask_sqla/generic.py#L268

https://github.com/PnX-SI/Utils-Flask-SQLAlchemy/blob/4a1d299100fa3076caab81b1274ae9750d37bd9c/src/utils_flask_sqla/generic.py#L254-L257

  • Il faudrait que les object GenericQuery (GenericQueryGeo) puisse renvoyer l'object query (et non query.all()) pour pouvoir ensuite l'exploiter dans le module d'export en utilisant query.yield_per(n)

  • Comment faire pour les geojson ?

    • utilisation des méthodes des modèles as geojson ??
    • créer une requete avec (colonnes + geom) et utiliser la fonction postgis ST_AsGeoJSON ?

écriture incrémentale d'un fichier

@joelclems joelclems converted this from a draft issue May 10, 2023
@VincentCauchois VincentCauchois moved this from Backlog to In Progress in Refonte module EXPORT May 10, 2023
@camillemonchicourt camillemonchicourt moved this from In Progress to Done in Refonte module EXPORT May 14, 2023
@camillemonchicourt
Copy link
Member

Duplicate #110

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

5 participants