-
Notifications
You must be signed in to change notification settings - Fork 545
Conversation
The feature has been added in commit 4e05130. The review pointed to some interesting new features like a new event to distinguish when request is really added or just aggregated. The new feature provides a more robust SpiceManager when many requests are triggered and are aggregated by the spice service (requestProcessor). Thx seva-ask. I am going to deploy snapshots. if you could try the new snapshots and approve the new feature works for you, that would be awesome. --UPDATE : snapshots are deployed. |
Thank you. I will try new snapshots tomorrow and notify about results. |
Thanks. That should be the last step before releasing version 1.4.7 . :) Eager to hear your feedback. |
As I can see, memory leak is fixed.
And this listener adds a request to map is each instance of SpiceManager. |
At the moment I don't know how to fix this bug quickly, but I am thinking about it. Maybe you will find the solution faster. |
I suggest returning to previous scheme of adding and removing listeners in spicemanager. So I made one more pull request with this changes. #186 |
Hi Ivanov, really nice bug again. I will solve it, don't worry, altough I got S. 2013/9/2 Vsevolod Ivanov [email protected]
Stéphane NICOLAS, |
Quickly thinking about it :
the third way seems poor to me as may need other information as well in the the first way looks interesting but I fear about memory leaks (as always). We should also add a test to get sure the bug you just found doesn't come If you feel like fixing it yourself, then I would appreciate the test and a Stéphane 2013/9/2 Stéphane Nicolas [email protected]
Stéphane NICOLAS, |
Yes, of course I run RS under debugger. I have some problems with it, because I use Android Studio and gradle projects which are not compatible with maven. So I have created gradle project for RS and attached sources from repository to it. But in this scheme I don't have test projects, so sometimes I can open original project in IDEA and run tests. The main problem that I see in this bug and around it - almost everything in robospice is operating with requests, but in my case I operate with listeners. Suppose we have two instances of SpiceManager and we are executing the same request in them with different listeners. Every callbacks are operating with Set, but listeners in this set may have come from different SpiceManagers. So if we are stopping one of SpiceManager instances, we actually want that request executing will continue and in the end listeners, that have come from all other SpiceManager instances will be run, and from stopped instance will not. |
Hi Vselod, thanks for sharing those ideas and for the pull request. The only thing I am wondering if there couldn't be a shared form of aggregation both at Don't you think so ? 2013/9/3 Vsevolod Ivanov [email protected]
Stéphane NICOLAS, |
Sorry, I don't understand you clear enough, can you please try to explain again? |
Snapshot has been deployed on sonatype and repo branch. |
Thank you for fixing. We are comparing memory usage of two variants of fixes. I am going to post results here tomorrow. |
Fine, thanks. Would you be interested in writing a small wiki entry on the github repo to Stéphane 2013/9/20 Vsevolod Ivanov [email protected]
Stéphane NICOLAS, |
As I can see, new build works well. |
Hi vsevolod, I am impressed by the measures you deploy to test your app. I would be I think I will release 1.4.7 soon. It's already late a bit. I can release a S.
|
It is a good idea to release 1.4.7. |
Hi Vselod, thanks for these informations. I am eager to see your app getting accepted You are right a cross platform framework is more than often disappointing, I have always wanted to add a section to RS about apps using it. Would you The app looks really nice and well done by the way. Greetings, 2013/9/21 Vsevolod Ivanov [email protected]
Stéphane NICOLAS, |
Thank you very much for your tenderness and warm words. |
Hello!
I started to use RoboSpice library in my project and I liked its design and usability very much.
But I have faced a problem: when I execute many similar requests, I have a great memory leak after them. After investigating this problem I have found that memory leak is in mapPendingRequestToRequestListener field in SpiceManager class. Some listeners are not removed from this map. It is so because this field is IdentityHashMap, but remove method is called only for one of aggregated requests. So I changed code a little to remove all listeners after execution.