GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Optimize availability check for "Run utPLSQL test" menu option · Issue #76 · utPLSQL/utPLSQL-SQLDeveloper

Optimize availability check for "Run utPLSQL test" menu option #76

New issue
Copy link
New issue
Copy link
Closed
#77
Closed
Optimize availability check for "Run utPLSQL test" menu option#76
#77
Copy link
Assignees
PhilippSalvisberg
Labels
enhancement
Milestone
v1.1.0

Description

@PhilippSalvisberg
PhilippSalvisberg
opened on Jul 16, 2019
Issue body actions

In the preferences you can configure if you want to check for the availability of the menu option "Run utPLSQL test". When set, the extension enables the menu option only when at least one test has been found. This may be slow for two reasons:

  1. because the annotation cache needs to be updated
    this happens only, if you do not use a DDL trigger to track changes, in this case changes are detected delayed, when running a test or when checking for availability of tests

  2. large schemas
    there is more data in the annotation cache and in the data dictionary, affecting the runtime performance of the queries, especially when no DDL trigger is in place, due to delayed annotation detection

Since version 3.1.8 the following functions are available in ut_runner:

  • has_suites
  • is_suite
  • is_test

These functions are optimized for performance and are faster than the generic table function get_suites_info. Hence these functions should be used whenever possible by the SQL Developer extension.

In fact these functions are available since utPLSQL version 3.1.3, but since version 3.1.8 they are considered reliable (see also utPLSQL/utPLSQL#976). Hence the use of this functions should be limited to utPLSQL version 3.1.8 and higher.

Activity

  1. PhilippSalvisberg
    added
    enhancement
    on Jul 16, 2019
  2. PhilippSalvisberg
    added this to the v1.1.0 milestone on Jul 16, 2019
  3. PhilippSalvisberg
    self-assigned this
    on Jul 16, 2019
  4. PhilippSalvisberg
    closed this as completedin #77on Jul 16, 2019
  5. PhilippSalvisberg
    added a commit that references this issue on Jul 16, 2019

    Merge pull request #77 from PhilippSalvisberg/feature/76_optmize_chec…

    86445e6
  6. jgebal commented on Jul 16, 2019

    @jgebal
    jgebal
    on Jul 16, 2019
    Member
    More actions

    @phsalvisberg
    I would need to double check but I think it was reliable before.
    Only develop (3.1.8-develop) had a bug as I went too far with optimizetions.
    Let me check change history to see.

  7. PhilippSalvisberg commented on Jul 16, 2019

    @PhilippSalvisberg
    PhilippSalvisberg
    on Jul 16, 2019
    MemberAuthor
    More actions

    @jgebal I checked. My JUnit test case fails with 3.1.7. All functions return false instead of true, because they do not update the annotation cache (without using the DDL trigger). I have not tested that with 3.1.8 yet. Maybe this is an issue there as well.

  8. jgebal commented on Jul 16, 2019

    @jgebal
    jgebal
    on Jul 16, 2019
    Member
    More actions

    The functionality was introduced in this change

    Since then it wasn't changed until this change and then this change in 3.1.8-develop

    I'm no sure why the functions don't work for you in 3.1.7. They should as they should update cache.
    Perhaps it's not worth digging in old versions.

    If this didn't work for you before 3.1.8, lets leave it active since 3.1.8 only.

  9. PhilippSalvisberg commented on Jul 16, 2019

    @PhilippSalvisberg
    PhilippSalvisberg
    on Jul 16, 2019
    MemberAuthor
    More actions

    The problem is that has_suite, is_suite and is_test do not check if the annotation cache is up-to-date. This is a problem when you install utPLSQL with install_headless.sql instead of install_headless_with_trigger.sql. Hence this works in the develop environment and in our CI environment where install_headless_with_trigger.sql is used behind the scenes. These functions do not deliver a reliable result. Even in 3.1.8 :-(

  10. PhilippSalvisberg commented on Jul 16, 2019

    @PhilippSalvisberg
    PhilippSalvisberg
    on Jul 16, 2019
    MemberAuthor
    More actions

    IMHO the functions should check if the DDL trigger is active. If not they have to update the annotation cache first. Similar logic as in get_suites_info.

  11. PhilippSalvisberg commented on Jul 16, 2019

    @PhilippSalvisberg
    PhilippSalvisberg
    on Jul 16, 2019
    MemberAuthor
    More actions

    If this will not be fixed in 3.1.8 I'll have to undo this change.

  12. jgebal
    reopened this on Jul 16, 2019
  13. jgebal commented on Jul 16, 2019

    @jgebal
    jgebal
    on Jul 16, 2019
    Member
    More actions

    They do, and they always did.
    line

        refresh_cache(l_owner_name);

    Is responsible for doing the check and cache refresh.

  14. PhilippSalvisberg commented on Jul 16, 2019

    @PhilippSalvisberg
    PhilippSalvisberg
    on Jul 16, 2019
    MemberAuthor
    More actions

    It's not working.

    Reacted by Jacek Gębal
  15. jgebal commented on Jul 16, 2019

    @jgebal
    jgebal
    on Jul 16, 2019
    Member
    More actions

    I can have a look at this in the evening.

  16. PhilippSalvisberg commented on Jul 16, 2019

    @PhilippSalvisberg
    PhilippSalvisberg
    on Jul 16, 2019
    MemberAuthor
    More actions

    @jgebal Why have you reopened this issue?

  17. jgebal commented on Jul 16, 2019

    @jgebal
    jgebal
    on Jul 16, 2019
    Member
    More actions

    Because we're discussing it and As you said, you might need to revert the change.
    Feel free to close if you want. I can open a different issue on utPLSQL

  18. PhilippSalvisberg commented on Jul 16, 2019

    @PhilippSalvisberg
    PhilippSalvisberg
    on Jul 16, 2019
    MemberAuthor
    More actions

    Ok, I checked it again.
    It works as expected (without trigger) in v3.1.8.
    It does not work (without trigger) in v3.1.7. JUnit test fails.
    Hence I close this issue.

  19. PhilippSalvisberg
    closed this as completedon Jul 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @PhilippSalvisberg
    PhilippSalvisberg

Labels

enhancement

Type

No type

Projects

No projects

    Milestone

    • v1.1.0

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402503 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.