Closed kosto1992 closed 5 years ago
thx, I'll make sure this one.
@ikeikeikeike this is insanely useful for me, any ETA on a merge as we're vendoring the fork right now.
The new location https://github.com/ikeikeikeike/go-sitemap-generator/tree/v2 A v2 branch will be set default branch instead of a master branch later.
Many thanks.
We needed to change the map into slices in go-sitemap-generator library and to disable concurrency. The change was needed because map is storing values in random order, so the output XML is not valid against XSDs. This change was done for the purposes of The Economist.
The library now allows to set the max number of processors (concurrency). If it is set to 1 it will not use concurrency, if it is set to lower then 1, it will use maxCPUs available.
I used 2d interfaces slice [][]interface{} - it will enable to process sitemap same way as they were processed. The format how to write the item when adding into sitemap has changed due to this change.
The change to slices is faster forPerformance 500 in Benchmark test.
Origin benchmark (with usage of map):
New benchmark (with usage of 2d slice of interfaces):