Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions performance.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# VFBquery Performance Test Results

**Test Date:** 2025-10-21 03:01:50 UTC
**Git Commit:** 0b907afb912bf74823942a33ffb91ef50531c457
**Branch:** main
**Workflow Run:** 18671440241
**Test Date:** 2025-10-21 16:36:49 UTC
**Git Commit:** 3c071f3202c2997ad95c1314c2a14762f2b05464
**Branch:** dev
**Workflow Run:** 18690968894

## Test Overview

Expand All @@ -25,11 +25,11 @@ This performance test measures the execution time of VFB term info queries for s

✅ **Test Status**: Performance test completed

- **FBbt_00003748 Query Time**: 1.4273 seconds
- **VFB_00101567 Query Time**: 1.3915 seconds
- **Total Query Time**: 2.8188 seconds
- **FBbt_00003748 Query Time**: 1.5294 seconds
- **VFB_00101567 Query Time**: 1.2568 seconds
- **Total Query Time**: 2.7862 seconds

🎉 **Result**: All performance thresholds met!

---
*Last updated: 2025-10-21 03:01:50 UTC*
*Last updated: 2025-10-21 16:36:49 UTC*
17 changes: 17 additions & 0 deletions src/vfbquery/vfb_queries.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,23 @@ def get_dict_cursor():
# Replace VfbConnect with SolrTermInfoFetcher
vc = SolrTermInfoFetcher()

def initialize_vfb_connect():
"""
Initialize VFB_connect by triggering the lazy load of the vfb and nc properties.
This causes VFB_connect to cache all terms, which takes ~95 seconds on first call.
Subsequent calls to functions using vc.nc will be fast.

:return: True if initialization successful, False otherwise
"""
try:
# Access the properties to trigger lazy loading
_ = vc.vfb
_ = vc.nc
return True
except Exception as e:
print(f"Failed to initialize VFB_connect: {e}")
return False

class Query:
def __init__(self, query, label, function, takes, preview=0, preview_columns=[], preview_results=[], output_format="table", count=-1):
self.query = query
Expand Down
Loading