From 61df7fe95b76eaf8216078f45f2cb690f04af879 Mon Sep 17 00:00:00 2001
From: Daniel <d.hornung@indiscale.com>
Date: Fri, 24 May 2024 13:15:38 +0200
Subject: [PATCH] DOC: Identified performance bottleneck.

---
 src/caoscrawler/crawl.py | 9 +++++++--
 src/doc/conf.py          | 2 ++
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/src/caoscrawler/crawl.py b/src/caoscrawler/crawl.py
index d21e6e25..53172dd2 100644
--- a/src/caoscrawler/crawl.py
+++ b/src/caoscrawler/crawl.py
@@ -646,8 +646,8 @@ class Crawler(object):
         registered_identifiable = self.identifiableAdapter.get_registered_identifiable(record)
         if registered_identifiable is None:
             return False
-        refs = self.identifiableAdapter.get_identifying_referencing_entities(referencing_entities,
-                                                                             registered_identifiable)
+        refs = self.identifiableAdapter.get_identifying_referencing_entities(
+            referencing_entities, registered_identifiable)
         if any(el is None for el in refs):
             return True
 
@@ -671,6 +671,11 @@ class Crawler(object):
 
         So the returned mapping maps ids of entities to the ids of objects which are referring
         to them.
+
+        .. todo::
+
+          This method takes about 2/3 of the time of synchronize(), it might be a good
+          optimization candidate.
         """
         # TODO we need to treat children of RecordTypes somehow.
         references: dict[int, dict[str, list[Union[int, None]]]] = {}
diff --git a/src/doc/conf.py b/src/doc/conf.py
index cf32b2e7..3248726e 100644
--- a/src/doc/conf.py
+++ b/src/doc/conf.py
@@ -219,3 +219,5 @@ autodoc_default_options = {
     'member-order': 'bysource',
     'special-member': ["__init__"],
 }
+
+todo_include_todos = True
-- 
GitLab