Kid Winchell Posted January 8, 2016 Share Posted January 8, 2016 Since the nations API page serves info for every nation in the game, it's a pretty large file. Since it's in the interest of everyone for things to be as small and fast as possible, redundant things should be removed. Particularly, the url tag provides no new information (it's just a static string plus nationid, which is already given), and removing it reduces filesize by 15%. Latitude and longitude serve no functional purpose other than determining your continent, which, again, is already given. And if people want it, they can grab it from an individual nation's API page, along with other flavour stats, like their leader's title. Removing latitude and longitude reduces filesize by 10%. There are minor things, like serving the nation's rank as an integer instead of a string reduces filesize by half a percent. Indenting with two spaces instead of four reduces filesize by 15%. Or, since properly-formatted, readable JSON doesn't seem to be that big of a concern, what with the random indentations all willy-nilly, you could just serve it as compact JSON, reducing filesize by 38%. tl;dr Compared to the current filesize, removing redundant info reduces filesize by 25%, trimming spaces reduces filesize by 15%, and serving compact JSON reduces filesize by 38%. Removing redundant info and trimming spaces reduces filesize by 39%, while removing redundant info and serving compace JSON reduces filesize by an impressive 57%. 1 Quote Link to comment Share on other sites More sharing options...
Administrators Alex Posted January 8, 2016 Administrators Share Posted January 8, 2016 That's a good idea. I'll get on it. Quote Is there a bug? Report It | Not understanding game mechanics? Ask About It | Got a good idea? Suggest ItForums Rules | Game Link Link to comment Share on other sites More sharing options...
Administrators Alex Posted January 8, 2016 Administrators Share Posted January 8, 2016 I've reduced the size of the nations API page by 58%. That's even 1% more than you calculated 3 Quote Is there a bug? Report It | Not understanding game mechanics? Ask About It | Got a good idea? Suggest ItForums Rules | Game Link Link to comment Share on other sites More sharing options...
Dan77 Posted January 10, 2016 Share Posted January 10, 2016 Thanks for killing half of my spreadsheets Another few hours lost by the looks of it. Hopefully it will speed things up ongoing though. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.