Skip to content

Commit

Permalink
Fix perf issue
Browse files Browse the repository at this point in the history
  • Loading branch information
jmao-denver committed Apr 10, 2024
1 parent 90ea666 commit f4e3799
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions py/server/deephaven/_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,11 @@ def _lookup_wrapped_class(j_obj: jpy.JType) -> List[JObjectWrapper]:
# load every module in the deephaven package so that all the wrapper classes are loaded and available to wrap
# the Java objects returned by calling resolve()
global _has_all_wrappers_imported
with _recursive_import_lock:
if not _has_all_wrappers_imported:
_recursive_import(__package__.partition(".")[0])
_has_all_wrappers_imported = True
if not _has_all_wrappers_imported:
with _recursive_import_lock:
if not _has_all_wrappers_imported:
_recursive_import(__package__.partition(".")[0])
_has_all_wrappers_imported = True

return [wc for wc in _di_wrapper_classes if wc.j_object_type.jclass.isInstance(j_obj)]

Expand Down

0 comments on commit f4e3799

Please sign in to comment.