Jesse Niininen

Results 70 comments of Jesse Niininen

Save editor doesn't even deserialize scene data, so it must be related to something in global data, I think.

It'd be ideal to not disable controls when saving though. But because the bottleneck shouldn't actually be writing the save to the disk it'd be quite problematic as obviously no...

Took a look at performance profile, most of the time is spent in `JObject.Parse` and `JToken.ToObject`. If performance really was a big problem writing a custom `JsonTextReader` would probably speed...

Managed to reduce the load time by ~30% with couple simple changes. JObject.Parse remains as the bottleneck when loading saves though. It doesn't really help that the save file is...

Reduced save time by over 60% (in my [example save](https://github.com/FINDarkside/TLD-Save-Editor/issues/35#issuecomment-551191731)) with d7a8b61bcaa73971bea344cba18631636e774767. It would probably be worth to do the same thing with all primitive arrays and lists, but byte...

Reduced save time by further ~25% by caching results of `GetCustomAttribute`. eef9c2700b9cc3612ec119233a3ae339021e9205 At the moment most of the save time is spent on `JsonTextWriter.WriteValue`, `CLZF.lzf_compress` and `JsonConvert.SerializeObject` so there probably...

Caching `Type.GetFields` and `Type.GetProperties` doesn't seem to give any noticeable improvements.

Yeah you're correct the save file is CLZF compressed, then it's json for some part, until `m_Dict` field is an object which values are binary data stored as number array...

Oh and at least in one point the profile file was invalid json, which is why I do [this](https://github.com/FINDarkside/TLD-Save-Editor/blob/b3b854a99d10fa10191bff813938ff31df449347/The%20Long%20Dark%20Save%20Editor%202/Profile.cs#L22) when deserializing and [this](https://github.com/FINDarkside/TLD-Save-Editor/blob/b3b854a99d10fa10191bff813938ff31df449347/The%20Long%20Dark%20Save%20Editor%202/Profile.cs#L40) when serializing the file. As for the...