perlorg / www.pm.org

Perl Mongers Website
http://www.pm.org
25 stars 53 forks source link

perl_mongers.json diffs are huge every flush #117

Closed jhannah closed 7 years ago

jhannah commented 7 years ago

@ranguard hey we abandoned WebDAV for git push publishing. Interestingly the JSON file

https://github.com/perlorg/www.pm.org/blob/master/bin/xml#L346

Is now by far the largest diff when a group changes, since it's order is random?

 OLD-STUFF/admins/metabase/metadata/ToDo |    4 +-
 faq/admin.html                          |    2 +-
 faq/hosting_faq.html                    |    2 +-
 faq/index.html                          |    2 +-
 groups/index.html                       |    6 +-
 groups/map.html                         |    2 +-
 groups/north_america.html               |    3 +-
 groups/perl_mongers.json                | 9484 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------------------------------------------------------
 groups/perl_mongers.xml                 |    2 +-
 groups/united_states_of_america.html    |   12 +-
 index.html                              |    4 +-
 start/index.html                        |    2 +-
 successful/index.html                   |    2 +-
 13 files changed, 4749 insertions(+), 4778 deletions(-)

In case you had any thoughts about ordering it or something to make the diffs sane? :)

ranguard commented 7 years ago

Does that help?

jhannah commented 7 years ago

It doesn't seem to. I flushed it, committed locally, changed 1 group, flushed it again:

 groups/perl_mongers.json             | 8060 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------------------------------------------------------------------------
jhannah commented 7 years ago

Looks like the groups are sorted now, but all the keys are random, so the diff is still huge

 [
    {
-      "meetup" : "",
-      "mailing_list" : {
-         "name" : ""
-      },
-      "name" : "ABE.pm",
+      "state" : "Pennsylvania",
+      "location" : "Allentown-Bethlehem-Easton, Pennsylvania, Lehigh Valley / ABE, United States of America, North America",
+      "facebook" : "",
+      "longitude" : "-75.370833",
       "tsar" : [
          {
-            "mail" : "rjbs <replace me by @> cpan.org",
-            "name" : "Ricardo Signes"
+            "name" : "Ricardo Signes",
+            "mail" : "rjbs <replace me by @> cpan.org"
          }
       ],
-      "description" : "Perl Mongers Allentown-Bethlehem-Easton, Pennsylvania, Lehigh Valley / ABE, United States of America, North America is the Perl users group that organizes meetings",
-      "location" : "Allentown-Bethlehem-Easton, Pennsylvania, Lehigh Valley / ABE, United States of America, North America",
-      "zoom" : 11,
-      "state" : "Pennsylvania",
-      "linked_location" : "Allentown-Bethlehem-Easton, Pennsylvania, Lehigh Valley / ABE, <a href=\"united_states_of_america.html\">United States of America</a>, <a href=\"north_america.html\">North Amer
ica</a>",
+      "continent" : "North America",
+      "linkedin" : "",
       "id" : "626",
-      "latitude" : "40.625833",
-      "googleplus" : "",
       "status" : "active",
+      "linked_location" : "Allentown-Bethlehem-Easton, Pennsylvania, Lehigh Valley / ABE, <a href=\"united_states_of_america.html\">United States of America</a>, <a href=\"north_america.html\">North Amer
ica</a>",
jacoby commented 7 years ago

Found out something new about JSON. Will PR a fix.