slow reload after onResume

  ... the Live-Wallpaper Extension for AndEngine.

slow reload after onResume

Postby pepposole » Fri Jul 22, 2011 10:32 am

Hello!

I'm developing a live wallpaper using this wonderful extension but i'm stuck trying to optimize reloading time
after a onPause triggering event (like screen locking or simply executing an application) and relative onResume.

When onResume is triggered, it takes 2-3 seconds to start animations (particles generator + registerEntityModifier applied to a sprite).


any advice to improve this "start-up" time? I got some opengl live wallpaper installed (like Jungle Waterfall) and it takes no time to resume animations so i guess i'm managing my wallpaper textures in a wrong way.

Thanks in advance
pepposole
 
Posts: 7
Joined: Fri Jul 15, 2011 3:32 pm

Re: slow reload after onResume

Postby pepposole » Fri Jul 22, 2011 12:39 pm

I noticed it takes 1,5 seconds on TextureManager's updateTextures function.

i think loadOnHardware is the time-consumption function.


what does it happens when live background loses his focus? every texture is unloaded from hardware?

if it doesn't, is it possible to check if textures are still in hardware memory before load them again?


i'm trying to figure out how to do it but i'm too noobie :oops:
pepposole
 
Posts: 7
Joined: Fri Jul 15, 2011 3:32 pm

Re: slow reload after onResume

Postby yeah00 » Fri Jul 22, 2011 10:42 pm

Did you find any solution to this?
yeah00
 
Posts: 15
Joined: Thu May 26, 2011 10:27 am

Re: slow reload after onResume

Postby pepposole » Sat Jul 23, 2011 11:08 am

yeah00 wrote:Did you find any solution to this?




still no... i'm waiting for a Nicolas suggestion
pepposole
 
Posts: 7
Joined: Fri Jul 15, 2011 3:32 pm

Re: slow reload after onResume

Postby pepposole » Tue Jul 26, 2011 11:51 am

noone knows? :cry:
pepposole
 
Posts: 7
Joined: Fri Jul 15, 2011 3:32 pm

Re: slow reload after onResume

Postby Moss » Tue Jul 26, 2011 10:57 pm

I'm having the same issue with orientation changes. It does not make too much sense to re-upload all the textures on onResume, if there where a close ok you have to but without?
Moss
 
Posts: 14
Joined: Mon Jun 13, 2011 8:18 pm
Location: Mallorca Spain

Re: slow reload after onResume

Postby yeah00 » Wed Jul 27, 2011 2:07 pm

This has been suggested in another post:
post18525.html?hilit=reloading%20textures#p18525

I guess we need to create a new BaseLiveWallpaperEngine that does not call on the Engine.onResume()
yeah00
 
Posts: 15
Joined: Thu May 26, 2011 10:27 am

Re: slow reload after onResume

Postby AlexNunn » Wed Jul 27, 2011 4:12 pm

Someone correct me if I'm wrong; I haven't done a wallpaper before...

If you don't pause the engine when the activity is paused, that means the engine will continue running and taking up CPU even when the wallpaper isn't displayed on the screen anymore. Your users might not be impressed about that.
AlexNunn
 
Posts: 604
Joined: Thu Oct 07, 2010 6:43 pm
Location: Kentucky

Re: slow reload after onResume

Postby yeah00 » Wed Jul 27, 2011 9:57 pm

I was a bit unclear, I meant a new BaseLiveWallpaper class that does not call the onResume() in Engine.java:
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. public void onResume() {
  2.                 // TODO GLHelper.reset(pGL); ?
  3.                 this.mTextureManager.reloadTextures();
  4.                 this.mFontManager.reloadFonts();
  5.                 BufferObjectManager.setActiveInstance(this.mBufferObjectManager);
  6.                 this.mBufferObjectManager.reloadBufferObjects();
  7.         }
Parsed in 0.032 seconds, using GeSHi 1.0.8.4
yeah00
 
Posts: 15
Joined: Thu May 26, 2011 10:27 am

Re: slow reload after onResume

Postby Moss » Sat Jul 30, 2011 3:49 pm

I'll try that :D
Moss
 
Posts: 14
Joined: Mon Jun 13, 2011 8:18 pm
Location: Mallorca Spain

Next

Return to Live-Wallpaper

Who is online

Users browsing this forum: No registered users and 3 guests