kilianc / adobe-generator

The missing link
3 stars 0 forks source link

Some files take a really long time ( > 9mins ) to parse, resulting in the PS UI being blocked #76

Closed timriot closed 11 years ago

timriot commented 11 years ago

I think this straight up has to do with the parsing of the DOM and/or the extend script engine, because dumping a 2MB image from layout.psd took < 2 seconds once the initial connection with the document was established, which would lead me to believe that the streaming bitmap stuff is incredibly fast and not the issue.

SLOW SAMPLE FILES (full logs for 1 & 2, as well as all the sample files available in our dropbox)

1.) cameras.psd – icon files, took nearly 10 minutes to parse (eek!)

11/30/2012 08:28:28: { data = "start parsing /Users/timriot/Documents/Work/Assets/example PSDs/rip/cameras_psd/cameras.psd"; name = log; } 11/30/2012 08:37:02: { data = "end parsing /Users/timriot/Documents/Work/Assets/example PSDs/rip/cameras_psd/cameras.psd"; name = log; }

2.) layout_edit_TR.psd – should look familiar ;] This one eventually freaked out, spawning another complete read of the document and blocking the UI for two more minutes. Bizarre!

11/30/2012 08:03:38: { data = "start parsing /Users/timriot/Documents/Work/In_progress/css/ Example Files/Kilian/layout_edit_TR.psd"; name = log; } 11/30/2012 08:05:32: { data = "end parsing /Users/timriot/Documents/Work/In_progress/css/ Example Files/Kilian/layout_edit_TR.psd"; name = log; }

3.) tools_services_with_feature_images_001_LH_TR.psd – This is the mock up of this page http://html.adobe.com/edge/ that Lars (cool Australian designer guy) made

11/30/2012 07:34:20: { data = "start parsing /Users/timriot/Documents/Work/In_progress/css/ Example Files/tools_services_with_feature_images_001_LH_TR.psd"; name = log; } 11/30/2012 07:34:51: { data = "end parsing /Users/timriot/Documents/Work/In_progress/css/ Example Files/tools_services_with_feature_images_001_LH_TR.psd"; name = log; }

4.) Designer_Spotlight_Process.psd – This is the demo crap that we used for our movies

11/30/2012 07:07:49: { data = "start parsing /Users/timriot/Documents/Work/In_progress/css/ Example Files/Designer_Spotlight_Process.psd"; name = log; } 11/30/2012 07:08:10: { data = "end parsing /Users/timriot/Documents/Work/In_progress/css/ Example Files/Designer_Spotlight_Process.psd"; name = log;

kilianc commented 11 years ago

I know. I'll work on speeding up the bootstrap process, but the bottleneck is photoshop sadly... The only way we have is to ask for a new C++ API.

timriot commented 11 years ago

Let's talk more about this before Monday. Now that we're getting closer to having the API fleshed out, we can start pointing out the performance issues.

If you have some specific suggestions for speed improvements, I will pass them along and begin the conversation on Monday.

Wanna catch up sometime today or tomorrow?

-Tim

On Saturday, December 1, 2012, Kilian Ciuffolo wrote:

I know. I'll work on speeding up the bootstrap process, but the bottleneck is photoshop sadly... The only way we have is to ask for a new C++ API.

— Reply to this email directly or view it on GitHubhttps://github.com/kilianc/motherlover/issues/76#issuecomment-10919981.

timriot commented 11 years ago

Ok, super naive / weird question – Any chance that for bootstrapping we could ask PS for a memcopy of the DOM, completely circumventing the JS engine? No parsing, just give ML the DOM (as a JSON object, maybe?), then ML could process it outside of PS.

timriot commented 11 years ago

Current status on this –

Tom Ruark will be looking for hotspots within the ScriptingSupport.plugin, that might be causing the slowdowns. If there are any places to improve performance within this plugin, any work done will also boost the speed of PS scripts in general. Tom R has also suggested that as a plan B, we might be able to speed up the processing of PSDs by using Action*.access (though this is not ideal, given the ugliness of implementation and our desire to release as open source).

kilianc commented 11 years ago

fixed