ubuntu-phone team mailing list archive
-
ubuntu-phone team
-
Mailing list archive
-
Message #06467
Re: StateSaver performance issue
I must agree with Roman: if you want to save the language, save the last
selected one, and check it in each delegate.
However, remember that StateSaver is mostly made for the cases when the
last application state is to be preserved, not for settings. In your case
I'd use something else than StateSaver to store the language.
Also note that we are preparing some behavioral changes for the StateSaver,
and may require some changes on your code to work properly. We are also
preparing to release the UbuntuSettings API, which woudl suit better for
your needs. Stay tuned.
On Sun, Feb 16, 2014 at 4:15 PM, Roman Shchekin <mrqtros@xxxxxxxxx> wrote:
> In my opinion it is extremely bad idea - put StateSaver in delegate.
> Try to rewrite your code in better way.
>
> BR,
> Roman.
>
>
> 2014-02-16 16:57 GMT+04:00 Sam Bull <sam.hacking@xxxxxxxx>:
>
>> Is there any tips on using a StateSaver?
>>
>> I just want to store a boolean state for a list of languages. I am
>> currently doing this by using a StateSaver on a delegate's checked
>> attribute.
>>
>> But now the app often becomes unresponsive for about 5 seconds when it
>> launches, and always hangs for about 5 seconds when closing the app,
>> maxing out the CPU in this time.
>>
>> Is there a better way to save this information?
>>
>> You can look at the code here, the StateSaver is at the bottom in the
>> delegate:
>>
>> http://bazaar.launchpad.net/~dreamsorcerer/eo-dict-app/trunk/view/head:/qml/SettingsPage.qml
>>
>> --
>> Mailing list: https://launchpad.net/~ubuntu-phone
>> Post to : ubuntu-phone@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~ubuntu-phone
>> More help : https://help.launchpad.net/ListHelp
>>
>>
>
> --
> Mailing list: https://launchpad.net/~ubuntu-phone
> Post to : ubuntu-phone@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~ubuntu-phone
> More help : https://help.launchpad.net/ListHelp
>
>
Follow ups
References