On 6 March 2015 at 21:05, Markus Armbruster <arm...@redhat.com> wrote: > Peter Maydell <peter.mayd...@linaro.org> writes: > >> On 5 March 2015 at 02:02, Markus Armbruster <arm...@redhat.com> wrote: >>> This patch initializes monitors earlier, thus makes more errors look >>> ugly. Do we care? >> >> Yeah, this doesn't seem great. Surely the actual problem here >> is that we're doing something that takes 30 seconds to initialise >> as part of our command line option parsing phase ? > > Yep. Quoting myself: > > Our startup is a big happy ad hoc mess. A more organizes [sic] > program would read and check configuration first (quick, can fail), > then allocate resources (quick, can fail), then initialize (somewhat > slow, failure unlikely). > > Reorganizing everything to work like that is a huge task. > > Until we get that (if ever!), all we can do is delay the most > egregiously slow initializations until after configuration checking and > monitor creation.
Yep, so we should delay the memset() til after all our init and option parsing, rather than just move the monitor parsing/init early. -- PMM