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
Not sure if this is an anti-pattern where decodedStream.Data is a DeflateStream, but this TiledSharp code runs extremely slow in certain cases -
if (encoding == "base64")
{
var decodedStream = new TmxBase64Data(xData);
var stream = decodedStream.Data;
using (var br = new BinaryReader(stream))
for (int j = 0; j < height; j++)
for (int i = 0; i < width; i++)
tiles[i + j * width] = new TmxLayerTile(br.ReadUInt32());
}
Is the issue that deflation happens at every br.ReadUInt32 call? Definitely seems like some redundant processing is happening here...
Interestingly, this code runs okay on my old machine...
The workaround is to disable compression in such maps like so -
The text was updated successfully, but these errors were encountered:
Should we just fork TiledSharp and fix this behavior ourselves? Nu users will quite possibly encounter this themselves and not know (nor care) it's a TiledSharp issue.
Not sure if this is an anti-pattern where decodedStream.Data is a DeflateStream, but this TiledSharp code runs extremely slow in certain cases -
Is the issue that deflation happens at every
br.ReadUInt32
call? Definitely seems like some redundant processing is happening here...Interestingly, this code runs okay on my old machine...
The workaround is to disable compression in such maps like so -
The text was updated successfully, but these errors were encountered: