diff --git a/content/posts/2018-11.md b/content/posts/2018-11.md index b8e270da9..c92a8c4a4 100644 --- a/content/posts/2018-11.md +++ b/content/posts/2018-11.md @@ -260,5 +260,13 @@ $ ./add-dc-rights.py -i /tmp/marlo.csv -db dspace -u dspace -p 'fuuu' ## 2018-11-06 - I updated all the [DSpace helper Python scripts](https://github.com/ilri/DSpace/wiki/Scripts) to validate against PEP 8 using Flake8 +- While I was updating the [rest-find-collections.py](https://gist.github.com/alanorth/ddd7f555f0e487fe0e9d3eb4ff26ce50) script I noticed it was using `expand=all` to get the collection and community IDs +- I realized I actually only need `expand=collections,subCommunities`, and I wanted to see how much overhead the extra expands created so I did three runs of each: + +``` +$ time ./rest-find-collections.py 10568/27629 --rest-url https://dspacetest.cgiar.org/rest +``` + +- Average time with all expands was 14.3 seconds, and 12.8 seconds with `collections,subCommunities`, so **1.5 seconds difference**! diff --git a/docs/2018-11/index.html b/docs/2018-11/index.html index 4ee52fcc1..db9573984 100644 --- a/docs/2018-11/index.html +++ b/docs/2018-11/index.html @@ -23,7 +23,7 @@ Today these are the top 10 IPs: " /> - + @@ -52,9 +52,9 @@ Today these are the top 10 IPs: "@type": "BlogPosting", "headline": "November, 2018", "url": "https://alanorth.github.io/cgspace-notes/2018-11/", - "wordCount": "1146", + "wordCount": "1215", "datePublished": "2018-11-01T16:41:30+02:00", - "dateModified": "2018-11-06T00:04:18+02:00", + "dateModified": "2018-11-06T11:36:04+02:00", "author": { "@type": "Person", "name": "Alan Orth" @@ -402,6 +402,15 @@ Today these are the top 10 IPs: + +
$ time ./rest-find-collections.py 10568/27629 --rest-url https://dspacetest.cgiar.org/rest
+
+ + diff --git a/docs/sitemap.xml b/docs/sitemap.xml index 6cf925e10..83863f89f 100644 --- a/docs/sitemap.xml +++ b/docs/sitemap.xml @@ -4,7 +4,7 @@ https://alanorth.github.io/cgspace-notes/2018-11/ - 2018-11-06T00:04:18+02:00 + 2018-11-06T11:36:04+02:00 @@ -194,7 +194,7 @@ https://alanorth.github.io/cgspace-notes/ - 2018-11-06T00:04:18+02:00 + 2018-11-06T11:36:04+02:00 0 @@ -205,7 +205,7 @@ https://alanorth.github.io/cgspace-notes/tags/notes/ - 2018-11-06T00:04:18+02:00 + 2018-11-06T11:36:04+02:00 0 @@ -217,13 +217,13 @@ https://alanorth.github.io/cgspace-notes/posts/ - 2018-11-06T00:04:18+02:00 + 2018-11-06T11:36:04+02:00 0 https://alanorth.github.io/cgspace-notes/tags/ - 2018-11-06T00:04:18+02:00 + 2018-11-06T11:36:04+02:00 0