View Issue Details

IDProjectCategoryView StatusLast Update
0003661OpenFOAMContributionpublic2021-04-14 12:11
ReporterdmishuraAssigned Tohenry 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version8 
Fixed in Versiondev 
Summary0003661: Slow file copy routine
DescriptionByte to byte copying is very slow. Code form src/OSspecific/POSIX/POSIX.C:
        // Copy character data.
        char ch;
        while (srcStream.get(ch))
        {
            destStream.put(ch);
        }

It can be rewritten as following:
        // Copy character data.

        destStream << srcStream.rdbuf();

        // Final check.

Built and checked on Linux, observed speedup up to 10x

TagsNo tags attached.

Activities

henry

2021-04-13 13:04

manager   ~0011992

Under what conditions is the performance of this function an issue?

dmishura

2021-04-13 13:07

reporter   ~0011993

Big model with precomputed initial fields. Decomposition will take longer time in this case.

henry

2021-04-14 12:11

manager   ~0011995

Resolved by commit e5dd6117b26465c4293f7e9793ba068dec58a700

Issue History

Date Modified Username Field Change
2021-04-13 12:46 dmishura New Issue
2021-04-13 13:04 henry Note Added: 0011992
2021-04-13 13:07 dmishura Note Added: 0011993
2021-04-14 12:11 henry Assigned To => henry
2021-04-14 12:11 henry Status new => resolved
2021-04-14 12:11 henry Resolution open => fixed
2021-04-14 12:11 henry Fixed in Version => dev
2021-04-14 12:11 henry Note Added: 0011995