Skip to content
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

performance issue - and easy fix #84

Open
GitMensch opened this issue Mar 21, 2023 · 0 comments
Open

performance issue - and easy fix #84

GitMensch opened this issue Mar 21, 2023 · 0 comments

Comments

@GitMensch
Copy link
Contributor

OCESQLSetResultParams take ~ 20% in some tested batch programs - and nearly all of this time is spend in add_sql_res_var_list. And ~15% of the cpu time is only spend in the following loop (here: line 2407)

Open-COBOL-ESQL/dblib/ocesql.c

Lines 2407 to 2409 in eec3a23

while(p->next != NULL){
p = p->next;
}

The simple solution: add another var next to _sql_var_lists that contains the last current entry, set it likely only in the same function, use it instead of the loop. Result: 14% cpu time saved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant