let profiler = CicUtil.profile "add_obj.typecheck_obj" in
fun uri obj -> profiler.CicUtil.profile (CicTypeChecker.typecheck_obj uri) obj
+let index_obj =
+ let profiler = CicUtil.profile "add_obj.index_obj" in
+ fun ~dbd ~uri ->
+ profiler.CicUtil.profile (fun uri -> MetadataDb.index_obj ~dbd ~uri) uri
+
+let save_object_to_disk =
+ let profiler = CicUtil.profile "add_obj.save_object_to_disk" in
+ fun status uri obj ->
+ profiler.CicUtil.profile (save_object_to_disk status uri) obj
+
let add_obj uri obj status =
let dbd = MatitaDb.instance () in
let suri = UriManager.string_of_uri uri in
else begin
typecheck_obj uri obj; (* 1 *)
try
- MetadataDb.index_obj ~dbd ~uri; (* 2 must be in the env *)
+ index_obj ~dbd ~uri; (* 2 must be in the env *)
try
let new_stuff = save_object_to_disk status uri obj in (* 3 *)
try