Skip to content

Refactor/perf batch 2#661

Merged
timcadman merged 65 commits into
v7.0-devfrom
refactor/perf-batch-2
Jun 10, 2026
Merged

Refactor/perf batch 2#661
timcadman merged 65 commits into
v7.0-devfrom
refactor/perf-batch-2

Conversation

@timcadman

@timcadman timcadman commented Apr 13, 2026

Copy link
Copy Markdown
Contributor

Summary of changes:

Client function refactoring

22 client functions refactored (ds.abs, ds.asCharacter, ds.asDataMatrix, ds.asInteger, ds.asList, ds.asLogical, ds.asMatrix, ds.asNumeric, ds.class, ds.colnames, ds.completeCases, ds.dim, ds.exp, ds.isNA, ds.length, ds.levels, ds.log, ds.ls, ds.names, ds.numNA, ds.sqrt, ds.unique):

  • Replaced datasource check and defaults boilerplate with .set_datasources()
  • Removed clientside validation of existence and class — validation now handled server-side by.loadServersideObject() and .checkClass()
  • Removed MODULE 5 object-creation checks (isAssigned, messageDS, is.object.created/validity.check returns)
  • Functions that call dimDS, lengthDS, numNaDS, isNaDS now unwrap list returns ($dim, $length, $numNA, $is.na)

New shared utilities in R/utils.R: .set_datasources(), .verify_datasources(), .checkClassConsistency(),
.check_df_name_provided()

Downstream fixes

13 additional client functions updated because they call refactored server functions: glmChecks, ds.summary, ds.quantileMean, ds.recodeLevels, ds.replaceNA, ds.rowColCalc, ds.subsetByClass, ds.dataFrameFill, meanByClassHelper0b, meanByClassHelper2, meanByClassHelper3, subsetHelper, checkClass. Key changes:

  • as.symbol(paste0("functionDS(...)"))call("functionDS", ...) where server functions now expect string names
  • Unwrap new list return formats from dimDS, lengthDS, numNaDS
  • Handle .loadServersideObject() erroring on missing columns (previously returned NULL silently)

Test updates

  • Wrong-class checks moved from arg to smk tests (now server-side errors)
  • $ValidityMessage expectations removed (levelsDS no longer returns it)
  • DISCORDANT tests updated for server-side column-not-found errors
  • Performance tests added for refactored functions

@timcadman timcadman changed the base branch from master to v7.0-dev April 13, 2026 07:58
@timcadman timcadman marked this pull request as ready for review April 14, 2026 11:51
@StuartWheater StuartWheater modified the milestones: v6.4, v7.0.0 Jun 8, 2026

@StuartWheater StuartWheater left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Changes have reduced number of client to server calles (except ds.quartileMean).
  • Added calls to do 'data source' parameter checks.
  • Client operation appear to have corresponding server operation changes, add '.loadServersideObject'
  • Changes to CI test system files appear to be up to date.

Print statements in errors in 'test-smk-ds.log.R', needed?
Perf test don't fail is no method profile is available

@timcadman timcadman merged commit acf7cb1 into v7.0-dev Jun 10, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants