Skip to content

performance issue - and easy fix #84

@GitMensch

Description

@GitMensch

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions