[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    Re: When is a shape loaded?
From:       Thomas Zander <zander () kde ! org>
Date:       2010-08-09 6:37:56
Message-ID: 201008090837.57112.zander () kde ! org
[Download RAW message or body]

Hey Yue Liu,

So good to hear from you again, and good to hear you are still working on the 
stencils!
Makes me happy :)

On Monday 9. August 2010 07.44.09 Yue Liu wrote:
> I'm hacking on stencil support. Currently I use one KoStore per shape
> to load stencils from odf files. Will all the shape be loaded at the
> same time when Kivio starts or when you drag them to the canvas from
> the shape selecter? I hope it's the latter, for loading too much
> stencils at the same time seems to be slow, but the icons are defined
> in ShapeFactory classes, the shape selecter will display them so I
> guess the former situation happens in KOffice.

First the shape plugins are loaded and they contain the KoShapeFactoryBase 
inheriting classes. This is completed before any window shows and should be 
pretty fast.
The icon is not created in this step.

The shape selector uses this information and shows that. So if you have a lot 
of stencils then you will have them shown in the shape selector. All that 
happens before any window is opened.
The icons are loaded from disk in this step using;
    m_icon = KIcon(iconName).pixmap(22);
in the constructor of IconShape.

If this turns out to be too slow then thats something we can easily fix by 
making the loading only happen when its first drawn. Or simply with a 2 second 
delay or something.
I thought the icon cache should protect us from such slowness, but I have not 
benchmarked it.

You said you think its too slow, can you share your findings? Maybe some numbers 
like how many stencils are there, how many icons are loaded. How long does it 
take to startup.
-- 
Thomas Zander
_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic