(fix) improved EAS speed, especially when fetching big attachments

pull/88/merge
Ludovic Marcotte 2015-06-02 12:57:37 -04:00
parent 18a0422367
commit 75206f1f2c
2 changed files with 33 additions and 1 deletions

View File

@ -66,7 +66,33 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
- (NSString *) activeSyncRepresentationInContext: (WOContext *) context
{
return [[self stringByEncodingBase64] stringByReplacingString: @"\n" withString: @""];
NSString *tmp, *s;
unichar *buf, *start, c;
int len, i, j;
tmp = [self stringByEncodingBase64] ;
len = [tmp length];
start = buf = (unichar *)malloc(len*sizeof(unichar));
[tmp getCharacters: buf range: NSMakeRange(0, len)];
for (i = 0, j = 0; i < len; i++)
{
c = *buf;
if (!(c == 0xA))
{
*(start+j) = c;
j++;
}
buf++;
}
s = [[NSString alloc] initWithCharactersNoCopy: start length: j freeWhenDone: YES];
return AUTORELEASE(s);
}
- (NSData *) wbxml2xml

6
NEWS
View File

@ -1,3 +1,9 @@
2.3.1 (2015-06-XX)
------------------
Enhancements
- improved EAS speed, especially when fetching big attachments
2.3.0 (2015-06-01)
-------------------