State:New|TargetRelease:No Target|icon_bug|icon_nuke|database:public|Resolution:Fixed|BugID:587883|
Problem summary:
Nuke Studio/Hiero projects load and close slowly if they contain media with very long frame ranges
Customer reported version:
Hiero N/A
Customer reported platform:
Multiple
Steps to reproduce:
1) Launch Nuke Studio and open the Script Editor window.
2) Paste the following code into the Script Editor and adjust the file paths on lines 8 and 9.
3) Execute the code to create two sample projects, one with offline media that has very long frame ranges, and one with shorter frame ranges:
from hiero.core import MediaSource, Clip, BinItem from hiero.core import events import time hiero.core.closeAllProjects() #### Modify these paths to valid locations before running the code #### path_A = "/path/to/short_range_test.hrox" path_B = "/path/to/long_range_test.hrox" proj_A = hiero.core.newProject() proj_B = hiero.core.newProject() def makeOfflineClips(project, endFrame, quantity): for i in range(quantity): offline = MediaSource.createOfflineVideoMediaSource("/tmp/my_frame.######.exr", 1, endFrame, 24) project.clipsBin().addItem(BinItem(Clip(offline))) def openCloseProject(path): global startTime startTime = time.time() proj = hiero.core.openProject(path) startTime = time.time() proj.close() def projectTimer(event, mode=None): global startTime, endTime endTime = time.time() duration = endTime-startTime print(f"{event.project} {mode} in {duration} seconds") #Project setup and savingmakeOfflineClips(proj_A, 500, 10) proj_A.saveAs(path_A) makeOfflineClips(proj_B, 500000, 10) proj_B.saveAs(path_B) #Close projects and register timer event hiero.core.closeAllProjects() events.registerInterest('kAfterProjectLoad',projectTimer, mode="loaded") events.registerInterest('kAfterProjectClose',projectTimer, mode="closed") print("Projects created, proceeding to timing test") openCloseProject(path_A) openCloseProject(path_B)4) Observe the output and note how the project that has offline Clips with very long frame ranges opens much slower (~120x) and closes much slower (~67x) than the project with shorter frame ranges:
We're sorry to hear that
Please tell us why