Skip to content

Table Viewer optimization in ITC #1466

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 29 commits into from
Jun 10, 2025

Conversation

danila-grobov
Copy link
Contributor

@danila-grobov danila-grobov commented May 3, 2025

Summary
Currently the table viewer is not usable for ITC connection, especially if you have a lot of columns, it takes like 20 seconds if not more to load. Related to the issue #1439 and #1233

I've also fixed #1132 in this. The table looks correct now:
image

I've mostly fixed that by making use of ADO DB connector that SAS includes with interop library. I borrowed a bunch of setup for this from #1388, so changes in CodeRunner for example are just a copy paste from that PR.

I was made aware of the crashing issue that others have faced with using this connector, however I didn't envounter it and I've tried oppening up a bunch of different tables.

I've also added a column type detection function, which I ripped from SAS Studio. So it interprets the formats in the same way and now we can see all of the beautiful icons.

image

Now it takes around 7 seconds including column loading, compared to 5 seconds that it takes in Enterprise Guide for the same table.

I did decide to stop at this point just to see what you guys think and release this into the wild. If this goes well, we can look into improving this further. There are at least three areas of pottential improvement:

  1. Adding loading indicators, which I think would make it seem a bit more responsive.
  2. Fetching metadata of the table and the data at the same time. Which I think would require a bunch of changes in ITC adapter architecture, because currently it is setup to allow only a single thing happening at the same time.
  3. Reducing the amount of initial columns. This trick is used in all other SAS clients, so might as well.

Testing

I don't have access to locally running SAS, so all of this has been tested on a remote IOM connection to a server running on RHEL.

  • Opening a table with contents that are more than 100 row limit
  • Opening a table with contents that are less than 100 row limit
  • Opening an empty table
  • Downloading a table
  • Scrolling through a large table
  • Test encoding
  • Test table with a single column
  • Test table with multiple columns
  • Test table with a single row

DanilaGrobovSEB and others added 7 commits April 13, 2025 20:53
I, Danila Grobov (s4642g) <danila.grobov@seb.se>, hereby add my Signed-off-by to this commit: 176ab4b
I, Danila Grobov (s4642g) <danila.grobov@seb.se>, hereby add my Signed-off-by to this commit: c12016f
I, Danila Grobov (s4642g) <danila.grobov@seb.se>, hereby add my Signed-off-by to this commit: 9d1aff6
I, Danila Grobov (s4642g) <danila.grobov@seb.se>, hereby add my Signed-off-by to this commit: 328b22d

Signed-off-by: Danila Grobov (s4642g) <danila.grobov@seb.se>
Signed-off-by: Danila Grobov (s4642g) <danila.grobov@seb.se>
Copy link
Member

@scnwwu scnwwu left a comment

Choose a reason for hiding this comment

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

Thank you @danila-grobov, overall looks great!

So it appears that 512 # adCmdTableDirect doesn't crash. I used general command select * from in my previous trial #1132 (comment) and it will crash.

@scnwwu scnwwu requested a review from scottdover May 6, 2025 06:09
DanilaGrobovSEB and others added 3 commits May 6, 2025 22:43
DCO Remediation Commit for Danila Grobov (s4642g) <danila.grobov@seb.se>

I, Danila Grobov (s4642g) <danila.grobov@seb.se>, hereby add my Signed-off-by to this commit: 2ab7999

Signed-off-by: Danila Grobov (s4642g) <danila.grobov@seb.se>
@danila-grobov danila-grobov requested a review from scnwwu May 6, 2025 20:19
Signed-off-by: Danila Grobov (s4642g) <danila.grobov@seb.se>
@danila-grobov
Copy link
Contributor Author

@scnwwu Fixed the tests: cd0ef99

It got a bit messy with mocking of the uuid 😅

Signed-off-by: Danila Grobov <danila.grob@gmail.com>
…zation

Signed-off-by: Danila Grobov <danila.grob@gmail.com>
Copy link
Contributor Author

@danila-grobov danila-grobov left a comment

Choose a reason for hiding this comment

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

@scnwwu Third time's the charm, I promise the tests will pass now.

@danila-grobov
Copy link
Contributor Author

@scnwwu Fixed linting issues.

@scnwwu
Copy link
Member

scnwwu commented May 19, 2025

Hi @danila-grobov, now that #1388 is merged. Please rebase your change with latest main branch. Thanks.
I'm not clear why you need to mock uuid while #1388 seems fine.

@DmitryMK
Copy link

I have tested the ITC connection with the latest version, works good and it is incredibly faster comparing to the previous approach. Great work @danila-grobov.

@DmitryMK
Copy link

DmitryMK commented Jun 2, 2025

@scnwwu @scottdover I have rewritten getLibraries and getTables using the same approach @danila-grobov used and it changed loading time of libraries from seconds to milliseconds in my case (which in my opinion makes user experience much better). I think it will be nice to be released together with this change. Should I submit a separate PR or add a commit in this one?

@scnwwu scnwwu added this to the 1.15.0 milestone Jun 3, 2025
@scnwwu
Copy link
Member

scnwwu commented Jun 3, 2025

@scnwwu @scottdover I have rewritten getLibraries and getTables using the same approach @danila-grobov used and it changed loading time of libraries from seconds to milliseconds in my case (which in my opinion makes user experience much better). I think it will be nice to be released together with this change. Should I submit a separate PR or add a commit in this one?

Thank you. That would be a good improvement. This PR is from @danila-grobov's forked repo I'm not sure if you're able to add a commit to the branch. I guess you can create a PR to @danila-grobov's branch and if @danila-grobov approved and merged it, it will be in this PR. Or you can create a separate PR after this one merged.

@DmitryMK
Copy link

DmitryMK commented Jun 3, 2025

@scnwwu @scottdover I have rewritten getLibraries and getTables using the same approach @danila-grobov used and it changed loading time of libraries from seconds to milliseconds in my case (which in my opinion makes user experience much better). I think it will be nice to be released together with this change. Should I submit a separate PR or add a commit in this one?

Thank you. That would be a good improvement. This PR is from @danila-grobov's forked repo I'm not sure if you're able to add a commit to the branch. I guess you can create a PR to @danila-grobov's branch and if @danila-grobov approved and merged it, it will be in this PR. Or you can create a separate PR after this one merged.

In this case I think it will be better if I create a separate PR, I'll try to do it tomorrow.

Copy link

@DmitryMK DmitryMK left a comment

Choose a reason for hiding this comment

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

Everything looks good, the date/time format is nice to have.

"MONTH",
"MON",
"DOWNAME",
].some((f) => format.includes(f)) &&
Copy link

Choose a reason for hiding this comment

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

Can we add 8601 formats? They are common in clinical programming.

Date: E8601DA, E8601DN, D8601DA, D8601DN: ([B|E]8601D[N|A])
Datetime: ([B|E]8601(D[T|Z|X]|LX))
Time: ([B|E]8601(T[M|Z|X]|LZ))

Copy link
Collaborator

@snlwih snlwih Jun 5, 2025

Choose a reason for hiding this comment

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

@scnwwu: Perhaps enhancing SAS format support to include the lateset available SAS-provided formats should be moved into a dedicated pull request?

@DmitryMK: Also wanted to create awarenes for the fact the the doc link mentioned in the previous comment for National Language Support formats is really old. Here are doc links that will always point to the latest production:

Tip: Use .../default/... instead of .../v_xxx/... in SAS Viya 4 doc links, so they resolve to the latest documentation.

dependabot bot added 2 commits June 3, 2025 21:31
…ssoftware#1502)

Bumps the docusaurus group in /website with 4 updates: [@docusaurus/preset-classic](https://github.com/facebook/docusaurus/tree/HEAD/packages/docusaurus-preset-classic), [@docusaurus/theme-mermaid](https://github.com/facebook/docusaurus/tree/HEAD/packages/docusaurus-theme-mermaid), [@docusaurus/module-type-aliases](https://github.com/facebook/docusaurus/tree/HEAD/packages/docusaurus-module-type-aliases) and [@docusaurus/tsconfig](https://github.com/facebook/docusaurus/tree/HEAD/packages/docusaurus-tsconfig).


Updates `@docusaurus/preset-classic` from 3.7.0 to 3.8.0
- [Release notes](https://github.com/facebook/docusaurus/releases)
- [Changelog](https://github.com/facebook/docusaurus/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/docusaurus/commits/v3.8.0/packages/docusaurus-preset-classic)

Updates `@docusaurus/theme-mermaid` from 3.7.0 to 3.8.0
- [Release notes](https://github.com/facebook/docusaurus/releases)
- [Changelog](https://github.com/facebook/docusaurus/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/docusaurus/commits/v3.8.0/packages/docusaurus-theme-mermaid)

Updates `@docusaurus/module-type-aliases` from 3.7.0 to 3.8.0
- [Release notes](https://github.com/facebook/docusaurus/releases)
- [Changelog](https://github.com/facebook/docusaurus/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/docusaurus/commits/v3.8.0/packages/docusaurus-module-type-aliases)

Updates `@docusaurus/tsconfig` from 3.7.0 to 3.8.0
- [Release notes](https://github.com/facebook/docusaurus/releases)
- [Changelog](https://github.com/facebook/docusaurus/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/docusaurus/commits/v3.8.0/packages/docusaurus-tsconfig)

---
updated-dependencies:
- dependency-name: "@docusaurus/preset-classic"
  dependency-version: 3.8.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: docusaurus
- dependency-name: "@docusaurus/theme-mermaid"
  dependency-version: 3.8.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: docusaurus
- dependency-name: "@docusaurus/module-type-aliases"
  dependency-version: 3.8.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: docusaurus
- dependency-name: "@docusaurus/tsconfig"
  dependency-version: 3.8.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: docusaurus
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…sassoftware#1504)

Bumps the dev group with 3 updates in the / directory: [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node), [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) and [eslint](https://github.com/eslint/eslint).

Updates `@types/node` from 22.15.19 to 22.15.29
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Updates `@typescript-eslint/eslint-plugin` from 8.32.1 to 8.33.0
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.33.0/packages/eslint-plugin)

Updates `@typescript-eslint/parser` from 8.32.1 to 8.33.0
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.33.0/packages/parser)

Updates `eslint` from 9.27.0 to 9.28.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](eslint/eslint@v9.27.0...v9.28.0)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-version: 22.15.29
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: dev
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-version: 8.33.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev
- dependency-name: "@typescript-eslint/parser"
  dependency-version: 8.33.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev
- dependency-name: eslint
  dependency-version: 9.28.0
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: dev
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@enzhihpp enzhihpp assigned Zhirong2022 and unassigned enzhihpp Jun 4, 2025
@Zhirong2022 Zhirong2022 added testing Test the pull requests and removed verification-needed labels Jun 5, 2025
@Zhirong2022
Copy link
Collaborator

Tested the PR with connection type COM and IOM

  1. It can show table in correct encoding (SAS.viewTable is not showing data with correct encoding #1132)
  2. It has a big improvement of loading large size table

@scnwwu
Copy link
Member

scnwwu commented Jun 9, 2025

@danila-grobov would you resolve the conflict and I'll merge it. Thank you.

@Zhirong2022 Zhirong2022 added testing-complete Complete the pull requests testing and removed testing Test the pull requests labels Jun 9, 2025
@danila-grobov
Copy link
Contributor Author

@scnwwu will do later today

DanilaGrobovSEB and others added 2 commits June 9, 2025 23:48
Signed-off-by: Danila Grobov <danila.grob@gmail.com>
@danila-grobov
Copy link
Contributor Author

@scnwwu Done, you can go ahead and merge.

@scnwwu scnwwu merged commit 9d55dce into sassoftware:main Jun 10, 2025
2 checks passed
@scnwwu
Copy link
Member

scnwwu commented Jun 10, 2025

Thank you again. Great contribution!

@Zhirong2022 Zhirong2022 added ready for release Code pushed, but not released in VS code marketplace yet and removed testing-complete Complete the pull requests testing labels Jun 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready for release Code pushed, but not released in VS code marketplace yet
Projects
None yet
8 participants