Skip to content

Program spending 3ms in an empty concat #169

@ryzhyk

Description

@ryzhyk

I am trying to understand the CPU profile of my DD program constructed using the logging API. The profile is dominated by Concat operators: out of ~0.5s total time spent in the dataflow, approximately 0.3s is spread across 200 or so Concatenate operators. This is not in itself too surprising, since the program contains a collection built by concatenating hundreds of rules. The weird part is that many of the operators actually concatenate an empty collection, e.g., according to the profile the program spends 3ms evaluating c1.concat(c2), where collection c2 has been empty throughout the run of the program.

Profiles vary slightly across runs, but the overall picture is pretty consistent.

I would appreciate any help in understanding what could be going on here: Is it possible that DD spends >0s (in fact, much more than that) concatenating an empty collection? Could this be an artifact or how DD reports operator runtimes? Or is this most likely a bug in my profiling code?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions