-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Owlready2 sends queries as soon as something is modified:
organization = cids.Organization() # This sends a query
organization.hasName = 'some name' # This sends a query
organizatiion.address = ... # This sends a queryThis could slow down performance when using SPARQL backend.
Proposed optimizations
Option 1
- Combine consecutive
INSERT DATAqueries into one.- Debounce the insertions, i.e. 5ms, or send the query as soon as other types of queries are requested.
- Involves multi-threading. A separate thread to schedule the query.
Option 2
- Change the logic of when queries are sent. (Can be turned off)
- Introduce a
save()method for individuals:
default_world.set_autosave(false) # Turn off real time modification organization = cids.Organization() organization.hasName = 'some name' organizatiion.address = ... organizatiion.save() # This sends some optimized queries.
- Introduce a
Option 3
- Implement Option1 and Option 2
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels