You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks guys for the efforts !
I got a little problem through it, once i load the app with 5 templates it generates 350~ templates and takes a lot of seconds to launch, and uses 150mb of ram while launching.
I am planning on adding 22 templates, is there a way to overcome this problem?
I know i can launch the templates loading on another thread to overcome the blocking and waiting it to launch, but if 5 templates are taking 150mb RAM then 22 are going to crash the app i guess.
P.S. I used the code of the DEMO as a first step, the only difference is that i migrated it to storyboards (copied the necessary methods to a new project and then used the storyboard to show the text).
The text was updated successfully, but these errors were encountered:
I realize this is an older post, but wanted to know if others ended up agreeing on the best way to improve the startup memory use (as the original poster mentions this is excessive on mobile).
Just as a simple test I added a simple autorelease pool wrapper inside the for loop of: https://github.com/britg/MultistrokeGestureRecognizer-iOS/blob/master/WTMGlyph/WTMGlyph.m#L64
Converted:
for (NSArray *unistroke in unistrokes) {
WTMGlyphTemplate *newTemplate = [[WTMGlyphTemplate alloc] initWithName:self.name
points:unistroke];
[self.templates addObject:newTemplate];
}
to
for (NSArray *unistroke in unistrokes) {
@autoreleasepool {
WTMGlyphTemplate *newTemplate = [[WTMGlyphTemplate alloc] initWithName:self.name
points:unistroke];
[self.templates addObject:newTemplate];
}
}
and the memory footprint on startup is very stable and doesnt explode even if you load the entire A-Z templates set
Thanks guys for the efforts !
I got a little problem through it, once i load the app with 5 templates it generates 350~ templates and takes a lot of seconds to launch, and uses 150mb of ram while launching.
I am planning on adding 22 templates, is there a way to overcome this problem?
I know i can launch the templates loading on another thread to overcome the blocking and waiting it to launch, but if 5 templates are taking 150mb RAM then 22 are going to crash the app i guess.
P.S. I used the code of the DEMO as a first step, the only difference is that i migrated it to storyboards (copied the necessary methods to a new project and then used the storyboard to show the text).
The text was updated successfully, but these errors were encountered: