Author Topic: Caching Pages  (Read 649 times)

fpad77

  • Newbie
  • *
  • Posts: 3
Caching Pages
« on: July 07, 2009, 01:33:22 PM »
Hi,
Whilst working on a custom setup for this, I've come across a little performance tweak (for me anyway!), I'm not sure what repercussions there will be later on so don't hold me to it!

What I was trying to do was start converting pages with alot of copy to bitmaps before they are added, however a thought ahead led me to think that this would have a dramatic effect on if I was going to start using flv's and whatnot.

So just to do a quick tester for any other method to get the pages faster for lots of copy (I'm on 1920x1200 so with liquid scaling it was getting a bit slow at turning), I just placed a simple cacheAsBitmap for the element, it sorted the speed ten-fold, but like I said I haven't seen the repercussions of this yet.

Either way, for those sort of pages it upped the performance nicely.

Anyway, its in the Pages.as file:

(nr line 193)
// Add at lowest level, so we do not override foldeffects and shadows.
         var index:int = (_elements as Array).indexOf(ele);
         var cont:DisplayObjectContainer = _pageContainer;
         ele.element.cacheAsBitmap = true;

Seemed to do the trick for me, incase it helps anyone else.

Florian Nücke

  • κρύα πόδια
  • Administrator
  • Hero Member
  • *****
  • Posts: 1413
  • MegaZine3 Developer
    • MegaZine3
Re: Caching Pages
« Reply #1 on: July 08, 2009, 03:38:54 PM »
Hi,

will have to give that a try... would be the first time that actually ever
sped anything up for me though ;D

But you never know. Thanks for the input.
For the Snark was a Boojum, you see.

Before you ask a question
          After you get an answer
  • please document your problem with the answer in the Project Wiki. (e.g. in the FAQs)
  • help others out if you can, by answering their questions on the forum.