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 issues #156

Open
brianmay opened this issue Feb 10, 2019 · 1 comment
Open

Performance issues #156

brianmay opened this issue Feb 10, 2019 · 1 comment

Comments

@brianmay
Copy link
Collaborator

Just need somewhere to record my data on performance issues. I think a issue might be the best place.

In my tests if I use:

            t0 = time.time()
            cls._compiled_workbook = ExcelCompiler(file=...)
            t1 = time.time()
            cls.calculator = cls._compiled_workbook.gen_graph()
            t2 = time.time()
            print("loaded", t1-t0, t2-t1, t2=t0)

I get the following times for 3 runs:

loaded 1.2965116500854492 8.90232515335083 10.19883680343628
loaded 1.3343768119812012 9.017873525619507 10.352250337600708
loaded 1.342972755432129 8.79265022277832 10.13562297821045

For the following:

        t0 = time.time()
        data = self.calculator.asdict()

        t1 = time.time()
        calculator = Spreadsheet.from_dict(data)

        t2 = time.time()
        print("done", t1-t0, t2-t1, t2-t0)

I get the following times for 3 runs:

done 0.2672147750854492 311.735009431839 312.00222420692444
done 0.18346762657165527 252.20295310020447 252.38642072677612
done 0.29434633255004883 322.1760091781616 322.47035551071167

For the following:

        t0 = time.time()
        self.calculator.dump("dump.txt.gz")

        t1 = time.time()
        calculator = calculator = Spreadsheet.load("dump.txt.gz")

        t2 = time.time()
        print("done", t1 - t0, t2 - t1, t2 - t0)

I get the following times for three runs:

done 0.7115657329559326 1.6663601398468018 2.3779258728027344
done 0.7441580295562744 1.4909374713897705 2.235095500946045
done 0.7094802856445312 1.4782490730285645 2.1877293586730957

While none of these times are anything special, I find it weird that from_dict() is much slower then anything else.

@danielsjf
Copy link
Collaborator

@brianmay, could you have another look at this performance after the latest fixes in #213? This could drastically improve your results.

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

No branches or pull requests

2 participants