Hey everyone!
My name is Aessa Nassri (you can call me Ace if that's easier) and I am a Computer Science student at the University of Illinois. I am interested in working with Catroid (specifically Paintroid) as a GSOC 2013 project.
I looked at the ideas list for GSOC 2013 and am interested in optimizing Paintroid's undo/redo functionality. In particular, I saw that it currently has to carry out every previous command each time something is undone/redone.
I haven't had any real experience with mobile technology, so feel free to correct any flawed assumptions in my suggestions.
As far as I can tell, Paintroid currently handles undo/redo commands by running every previous command and then returning the resulting image. One (extreme) solution is to remember each previous frame, which would be fast but take up way too much memory. The other extreme is what Paintroid currently does - keep only the active frame in memory and re-render anything else from scratch (which saves memory at the cost of speed).
What I am proposing is that Paintroid should precompute a certain number of previous frames and store them in case an undo/redo request is submitted by the user. For example, a simple implementation of my solution would store every 5th frame (up to a certain point) and perform only the commands that happened between the stored frame that is closest to the target frame and the target frame itself.
The main improvement to this solution that I can see is to find a good mathematical function for determining which frames should be stored. In particular, users will most likely do lots of short undo operations (5 undos or less) and relatively few long undo operations (15 undos or more). However, the long operations should not require that every single command be run to generate their results. (This is why storing only the first 20 frames is a bad idea - what if a large percent of undo requests are 21 undos or longer?) Part of the project would be to find a good function that specifies which frames should be saved so that a good balance between speed and memory is achieved.
Another aspect of this solution is the precomputation and/or saving of frames once the user has undone an action. This is necessary because as actions are done, it is easy to grab the current image and add it to a list of stored ones (i.e. as the user is moving 'forward'). However, when the user undoes a large number of actions (and moves 'backward'), the frame behind the one the user stops undoing at may have been forgotten to save memory and needs to be regenerated in case they want to make a small undo. (For example, a user at frame 40 undoes 20 actions, waits 5 seconds, and then undoes 1 action. Even though Paintroid may not have stored any frames before frame 20, it can use the 5 seconds to asynchronously compute them while the user isn't doing anything so that the user's 1 undo is reasonably fast.)
I know my explanation may be a bit long-winded and hard to understand, so feel free to ask questions or suggest improvements.
Also, I am having trouble getting Paintroid set up in Eclipse (I'm using 3.7.2 and Versions 15/17 of the Android SDK if that helps.) In particular, I am getting a lot of errors along the lines of "X cannot be resolved to (a) Y" e.g. "Menu cannot be resolved to a type." I have loaded 3 projects (ActionBarSherlock, Paintroid, PaintroidTest; PaintroidSourceTest wouldn't load) into Eclipse and put them in the same working set, so I think that Eclipse has access to the files being referenced. I am also running Ubuntu 12.04 LTS and have checked out the latest code from Paintroid's GitHub. Note that I haven't checked out anything but the Paintroid repository from Catrobat's GitHub page (which may be part of the problem). Any help with this is definitely appreciated! (I will look into it more on my own after an exam I have on Wednesday.)
Thanks,
Aessa "Ace" Nassri
Hey Stefan,
I am getting errors saying that "org.catroid.paintroid.R" can't be imported because Eclipse can't find it within any of the Paintroid source files. I tried to find out what it was pointing to by looking through the Paintroid code on GitHub and Eclipse, but my search came up empty. As far as I can tell, ActionBarSherlock and Android both have their own version of R - but org.catroid.paintroid contains no mention of any.
Ace
Just tried that for every project. No luck there.
Ace
The image is a bit blurry - the errors are of this general form:"error: Error retrieving parent for item: No resource found that matches the given name '@style/Theme.Sherlock.[more error text]"
On Friday, April 19, 2013 3:07:29 PM UTC-5, Ace Nassri wrote:
Stefan,
My guess is that ActionBarSherlock isn't fully or properly imported.
Yep. There are definitely errors in the .xml files. (Specifically style.xml)
Thanks,
Ace