Skip to content

Conversation

@bcallender
Copy link
Contributor

@bcallender bcallender commented Sep 24, 2025

Refactor DatasetSpec to lazily load dataframes and improve caching

  • Make tool operation functions synchronous
  • Have DatasetSpec lazily fetch the dataframe using session.table instead of keeping it in memory over the lifespan of the server.
  • Additionally, removed profile caching, and refactored the profile calculation mechanism to parallelize the calculations within polars.

Copy link
Contributor Author

bcallender commented Sep 24, 2025

This stack of pull requests is managed by Graphite. Learn more about stacking.

@bcallender bcallender changed the title refactor: have DatasetSpec lazily fetch the dataframe using session.table instead of keeping it in memory over the lifespan of the server. allowed a couple other optimizations around caching the tables' schema/fingerprint. additionally, moved profile caching out of catalog views and into memory since the views are so small and ephemeral refactor: have DatasetSpec lazily fetch the dataframe using session.table instead of keeping it in memory Sep 24, 2025
@bcallender bcallender marked this pull request as ready for review September 24, 2025 01:34
@bcallender bcallender force-pushed the refactor/mcp_memory_optimization branch 2 times, most recently from 71e5cc4 to 07b9de9 Compare September 24, 2025 17:00
…table` instead of keeping it in memory over the lifespan of the server. allowed a couple other optimizations around caching the tables' schema/fingerprint. additionally, moved profile caching out of catalog views and into memory since the views are so small and ephemeral
@bcallender bcallender added the 0.5.0 PRs to be merged for the 0.5.0 release label Sep 24, 2025
…dation check from read, removed session from ToolDataset
…ation exprs upfront and applying them in a parallel select
@bcallender bcallender force-pushed the refactor/mcp_memory_optimization branch from 00763e3 to 35291ad Compare September 25, 2025 22:12
@bcallender bcallender force-pushed the refactor/mcp_memory_optimization branch from 35291ad to 46cf3de Compare September 25, 2025 22:13
@bcallender bcallender merged commit 04299d6 into main Sep 25, 2025
12 checks passed
@bcallender bcallender deleted the refactor/mcp_memory_optimization branch September 25, 2025 22:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

0.5.0 PRs to be merged for the 0.5.0 release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants