<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">Am 21.07.2015 um 20:13 schrieb Felix Paul Kühne <<a href="mailto:fkuehne@videolan.org" class="">fkuehne@videolan.org</a>>:</div><br class="Apple-interchange-newline"><div class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">On 21 Jul 2015, at 18:47, David Fuhrmann <</span><a href="mailto:david.fuhrmann@gmail.com" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">david.fuhrmann@gmail.com</a><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">> wrote:</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><blockquote type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><br class=""><blockquote type="cite" class=""><br class="">Am 21.07.2015 um 17:52 schrieb Felix Paul Kühne <<a href="mailto:git@videolan.org" class="">git@videolan.org</a>>:<br class=""><br class="">vlc | branch: master | Felix Paul Kühne <<a href="mailto:fkuehne@videolan.org" class="">fkuehne@videolan.org</a>> | Tue Jul 21 17:50:49 2015 +0200| [f450457875207163ddb4f435e0bb5dc868e35ee8] | committer: Felix Paul Kühne<br class=""><br class="">macosx: refactor main class object life management and main menu<br class=""><br class=""><blockquote type="cite" class=""><a href="http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f450457875207163ddb4f435e0bb5dc868e35ee8" class="">http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f450457875207163ddb4f435e0bb5dc868e35ee8</a><br class=""></blockquote>---<br class=""><br class="">.../macosx/Resources/English.lproj/MainMenu.xib    |10096 +++-----------------<br class="">.../package/macosx/vlc.xcodeproj/project.pbxproj   |    8 -<br class="">modules/gui/macosx/ControlsBar.m                   |    4 +-<br class="">modules/gui/macosx/CoreInteraction.h               |    2 +<br class="">modules/gui/macosx/CoreInteraction.m               |   46 +-<br class="">modules/gui/macosx/MainMenu.h                      |  456 +-<br class="">modules/gui/macosx/MainMenu.m                      | 1338 +--<br class="">modules/gui/macosx/MainWindow.m                    |    6 +-<br class="">modules/gui/macosx/Makefile.am                     |    1 -<br class="">modules/gui/macosx/VideoView.m                     |    6 +-<br class="">modules/gui/macosx/controls.h                      |   70 -<br class="">modules/gui/macosx/controls.m                      |  255 -<br class="">modules/gui/macosx/intf.h                          |    4 -<br class="">modules/gui/macosx/intf.m                          |   82 +-<br class="">modules/gui/macosx/misc.m                          |    6 +-<br class="">modules/gui/macosx/playlist.m                      |    1 -<br class="">16 files changed, 2175 insertions(+), 10206 deletions(-)<br class=""><br class=""></blockquote><br class=""><blockquote type="cite" class="">-        [NSBundle loadNibNamed:@"MainMenu" owner:NSApp];<br class="">-        [NSBundle loadNibNamed:@"MainWindow" owner:[VLCMain sharedInstance]];<br class="">-<br class="">-        [[[VLCMain sharedInstance] mainWindow] makeKeyAndOrderFront:nil];<br class="">-<br class=""></blockquote><br class="">Hi Felix,<br class=""><br class="">This is wrong and reverts 9434662c9228278ccd18fd649e71fa809745a576. As explained in the commit log already, there should be no performance improvement if you move stuff to application:willFinishLaunching.<br class=""><br class="">Additionally, initialization needs to be done in OpenIntf() (there might be still missing), not moved outside. Otherwise the vout might get created before init is complete.<br class=""></blockquote><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Can you be more precise on what you think really needs to be initialized in OpenIntf()?</span></div></blockquote><div><br class=""></div><div>At least, all VLC callbacks should have been registered. The vout window provider can be triggered at any time after OpenIntf (even before application:WillfinishLaunching or similar), so important initialization need to happen earlier. So in fact, the main window needs to be there, if we want to have embedded video playback.</div><div><br class=""></div><div>And we need to load the main window anyway right from the start - without it VLC is unusable. So I see no reason to artificially delay its loading...</div><br class=""><blockquote type="cite" class=""><div class=""><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Note that loading the MainWindow xib currently loads VLCPlaylist, VLCMainWindow and VLCMainWindowControlsBar, which will not be the case anymore by the end of the week. Then, loading the xib will load the UI representation stored in the xib and that’s about it.</span></div></blockquote><div><br class=""></div><div>Well we need an existing parent view for the out window provider. So its not only about helper classes, but about the UI content itself. But you are absolutely right, the xib should contain the UI and not any other important objects like VLCPlaylist...</div><div><br class=""></div><div>I would say, first make the init order right (see above points), and afterwards we can think about optimizations by lazy loading.</div><div><br class=""></div><div>Best regards,</div><div>David</div></div></body></html>