taipy
taipy copied to clipboard
Improve performance of Versioning system on repositories
Description
- The
_load_all()and_load_all_by()methods of FS repository is searching for the version inside file content, while previously this only need to look at the file name. - Every time a new entity is created, the latest version is retrieve from the
version.jsonfile. There should be another mechanism to store and load the latest version number from memory.
On SQLrepo, _delete_by() method can be:
def _delete_by(self, attribute: str, value: str):
self.db.query(self.model_type).filter_by(**{attribute: value}).delete()
Probably something similar on MongoRepo