Issue 12888 - Call SalGraphics::GetDevFontList() upon demand only
Summary: Call SalGraphics::GetDevFontList() upon demand only
Status: CLOSED FIXED
Alias: None
Product: gsl
Classification: Code
Component: code (show other issues)
Version: 644
Hardware: All All
: P3 Trivial (vote)
Target Milestone: OOo 1.1 Beta2
Assignee: matthias.huetsch
QA Contact: issues@gsl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-03-31 20:01 UTC by matthias.huetsch
Modified: 2003-04-29 12:48 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description matthias.huetsch 2003-03-31 20:01:35 UTC
Hi Phillip,

Currently SalGraphics::GetDevFontList(), collecting the list of fonts installed
on the system, is called from within the very first 'Window' constructor (in
method 'Window::ImplInit()') to fill that list of fonts into the (static)
'Application' settings instance.

As that very first Window happens to be the 'splash screen' / 'intro bitmap',
which does not otherwise requests or needs any font, the font collection may
delay the time of displaying the splash screen significantly, depending on how
long the font collection actually takes.

The second instance where GetDevFontList() is called, and which seems avoidable
too, is via 'Application::MergeSystemSettings()', which constructs a Window
instance via 'ImplGetDefaultWindow()'. Now this Window's 'ImplInit()' would
call 'SalGraphics::GetDevFontList()' if the font list wouldn't have been feed
into the Application settings before.

The third instance where GetDevFontList() is called, is from within a Printer
constructor, and only here it seems to be called on purpose / demand, but I'm
not sure.

All there occurrences do happen during startup while displaying the splash
screen. For a better startup experience, calls to GetDevFontList() should be
delayed as much as possible. In particular, the calls related to the Application
setting should be removed.

Thanks,
Matthias
Comment 1 matthias.huetsch 2003-03-31 20:02:13 UTC
Added target milestone 'OOo 1.1 Beta2'.
Comment 2 philipp.lohmann 2003-04-01 08:07:53 UTC
will change "on demand" behaviour
Comment 3 philipp.lohmann 2003-04-01 19:28:12 UTC
I looked into this; as you said the IntroWindow does not really need
the  font list; Application::MergeSystemSettings on the other hand
needs it since at this time the application font gets set (which is
part of the Settings); if i delay GetDevFontList after this point i
end up with a different font from what it should be. I currently don't
see a feasible way around that. But at least it does not delay the
IntroWindow anymore. Unless you disagree i consider this fixed in vcl07.
Comment 4 matthias.huetsch 2003-04-01 20:06:14 UTC
Hi Phillip,

With the accompanying issue 12889 being fixed, I see no problem in
the fix you provided for this issue.

The only thing that possibly remains, is to think about the concept
of an 'Application Font' as static data, and how much sense all this
static stuff really makes. But we may leave this open for now.

Thanks for investigating into this,
Matthias
Comment 5 philipp.lohmann 2003-04-04 10:51:00 UTC
changes are in vcl07
Comment 6 matthias.huetsch 2003-04-04 13:41:09 UTC
Fix verified on 'cws_srx644_vcl07'.
Comment 7 matthias.huetsch 2003-04-04 13:42:11 UTC
Verified...
Comment 8 matthias.huetsch 2003-04-29 12:48:24 UTC
Verified integration into SRX644/m12s1 -> closing.