Bug #401

2.0 Slows down during configuration

Added by Espen Solbu over 6 years ago. Updated over 6 years ago.

Status:ClosedStart date:04/20/2012
Priority:HighDue date:
Assignee:Android Dashboard Developers% Done:


Category:DebugSpent time:-
Target version:2.0 Multiple models


Tested with 2.0B2, and r338

Usage pattern both times:
- power up radio
- power up model
- launch app
- preliminary setup of model in app
- connect app to bt
- Values work, but factor is wrong so i start to tune it. (Edit channel, modify factor, save, repeat)
- After about 4-5 such "tuning" atempts, it started to slow down. Eventually it got so slow that i had to give up.
(The app appears to hang)

Related issues

Related to Bug #348: Performance issues Closed 02/10/2012

Associated revisions

Revision 358
Added by Hans Cappelle over 6 years ago

refs #401 fixes double channel creation on config edit


#1 Updated by Espen Solbu over 6 years ago

Need to test:
  • Does this happen after a certain time as long as connected, or related to channel editing?
  • If related to channel editing; * Is it enough to open dialog and save? * Is it enough to open dialog and back? * Must we edit?
  • Could it be related to "gong back" to dashboard rather than Channel Edit?

#2 Updated by Hans Cappelle over 6 years ago

  • Category set to Debug
  • Status changed from New to Feedback
  • Assignee set to Hans Cappelle
  • % Done changed from 0 to 30


I debugged this issue and you were right. On saving a Channel object a new Channel is registered while the old one isn't unregistered. You can check the object IDs while debugging to see the difference.

I also found the cause of this. The Channel object is passed with the Intent starting the ActivityChannelConfig and this is done using Parcelable interface on Channel object. However if you do so you create a new Channel object in memory instead of refering to the original one. This way the actual editing occurs on a new Channel and so does the register (with check for unregister failing since this is a new Channel).

I'll look into a solution for this. Ideal would be that we have a fixed collection of Channel instances (I believe this is already available via the Channels on a Model instance) and then in the edit activity refer to these objects instead of using Parelable interface.

public static final Parcelable.Creator CREATOR =
new Parcelable.Creator() {
public Channel createFromParcel(Parcel in) {
return new Channel(in);
public Channel[] newArray(int size) {
return new Channel[size];

I will however also conitnue investigating issues on resuming the dash board activity since I had performance issues after only adding a single model, saving 2 channels in a test session. I did open other applications in between though so there could be other leaks as well. I'l keep you posted.

#3 Updated by Hans Cappelle over 6 years ago

  • Status changed from Feedback to Resolved
  • Assignee changed from Hans Cappelle to Android Dashboard Testers

fixed this. Needs retesting on the field. I verified that the Channel instances are now respected. Instead of passing via parcelable the indexes are now passed with intent. Only for new Channel creations I kept the parcelable since no issue there.

#4 Updated by Hans Cappelle over 6 years ago

  • % Done changed from 30 to 100

#5 Updated by Espen Solbu over 6 years ago

  • Status changed from Resolved to In Progress
  • % Done changed from 100 to 80

Bug no longer evident when editing existing channel!! (I tried editing the channel 8-10 times) Very good!

However, as soon as I tried adding a new channel to the model and editing this, it slowed down alot and crashed again. I suspect also adding new model needs to be reviewed. Maybe get rid of parcelable for channels entirely...

#6 Updated by Espen Solbu over 6 years ago

  • Assignee changed from Android Dashboard Testers to Android Dashboard Developers

#7 Updated by Hans Cappelle over 6 years ago

I removed the parcellable interface from Channel and tested with a new added Channel. Didn't slow down. Had simulator running, not sure if that is enough. Let me know if you can still reproduce this slow down.

#8 Updated by Espen Solbu over 6 years ago

  • Status changed from In Progress to Closed

Been unable to reproduce it

Also available in: Atom PDF