question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Reading 65^3 Iridas 3D LUT is incredibly slow.

See original GitHub issue

First time using Colour. Trying to read loads of 65^3 .cube files in Jupyter notebook. It takes over 3 mins on the first one.

%time LUT = cs.io.read_LUT_IridasCube(luts[126])

CPU times: user 3min 20s, sys: 1.88 s, total: 3min 22s
Wall time: 3min 22s

Changing https://github.com/colour-science/colour/blob/2b2ad0a0f2052a1a0b4b076b489687235e804fdf/colour/io/luts/iridas_cube.py#L135

to

table.append(tokens)

gives no difference to the result and computes faster

%time LUTfast = read_LUT_IridasCube(luts[126])
CPU times: user 633 ms, sys: 26.2 ms, total: 659 ms
Wall time: 661 ms
np.allclose(LUTfast.table, LUT.table)

True

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:17 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
KelSolaarcommented, Jun 7, 2020

@lavrovd : @njwardhan’s PR #596 has been merged in the develop branch, so it should be up to full speed now! When you have a chance, let us know if it is fine, I’m assuming it is!

1reaction
lavrovdcommented, Jun 4, 2020
===============================================================================
*                                                                             *
*   Interpreter :                                                             *
*       python : 3.7.2 (default, Dec 29 2018, 00:00:04)                       *
*                [Clang 4.0.1 (tags/RELEASE_401/final)]                       *
*                                                                             *
*   colour-science.org :                                                      *
*       colour : 0.3.15                                                       *
*                                                                             *
*   Runtime :                                                                 *
*       imageio : 2.5.0                                                       *
*       matplotlib : 2.2.3                                                    *
*       numpy : 1.15.4                                                        *
*       pandas : 0.24.2                                                       *
*       scipy : 1.1.0                                                         *
*       six : 1.12.0                                                          *
*                                                                             *
===============================================================================
Out[4]:
defaultdict(collections.OrderedDict,
            {'Interpreter': OrderedDict([('python',
                           '3.7.2 (default, Dec 29 2018, 00:00:04) \n[Clang 4.0.1 (tags/RELEASE_401/final)]')]),
             'colour-science.org': OrderedDict([('colour', '0.3.15')]),
             'Runtime': OrderedDict([('imageio', '2.5.0'),
                          ('matplotlib', '2.2.3'),
                          ('numpy', '1.15.4'),
                          ('pandas', '0.24.2'),
                          ('scipy', '1.1.0'),
                          ('six', '1.12.0')])})
Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found