Update notes for 2018-11-06

This commit is contained in:
Alan Orth 2018-11-06 18:03:44 +02:00
parent 24bbc3d1a3
commit 6d65a66c20
Signed by: alanorth
GPG Key ID: 0FB860CC9C45B1B9
3 changed files with 25 additions and 8 deletions

View File

@ -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**!
<!-- vim: set sw=2 ts=2: -->

View File

@ -23,7 +23,7 @@ Today these are the top 10 IPs:
" />
<meta property="og:type" content="article" />
<meta property="og:url" content="https://alanorth.github.io/cgspace-notes/2018-11/" /><meta property="article:published_time" content="2018-11-01T16:41:30&#43;02:00"/>
<meta property="article:modified_time" content="2018-11-06T00:04:18&#43;02:00"/>
<meta property="article:modified_time" content="2018-11-06T11:36:04&#43;02:00"/>
<meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="November, 2018"/>
@ -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&#43;02:00",
"dateModified": "2018-11-06T00:04:18&#43;02:00",
"dateModified": "2018-11-06T11:36:04&#43;02:00",
"author": {
"@type": "Person",
"name": "Alan Orth"
@ -402,6 +402,15 @@ Today these are the top 10 IPs:
<ul>
<li>I updated all the <a href="https://github.com/ilri/DSpace/wiki/Scripts">DSpace helper Python scripts</a> to validate against PEP 8 using Flake8</li>
<li>While I was updating the <a href="https://gist.github.com/alanorth/ddd7f555f0e487fe0e9d3eb4ff26ce50">rest-find-collections.py</a> script I noticed it was using <code>expand=all</code> to get the collection and community IDs</li>
<li>I realized I actually only need <code>expand=collections,subCommunities</code>, and I wanted to see how much overhead the extra expands created so I did three runs of each:</li>
</ul>
<pre><code>$ time ./rest-find-collections.py 10568/27629 --rest-url https://dspacetest.cgiar.org/rest
</code></pre>
<ul>
<li>Average time with all expands was 14.3 seconds, and 12.8 seconds with <code>collections,subCommunities</code>, so <strong>1.5 seconds difference</strong>!</li>
</ul>
<!-- vim: set sw=2 ts=2: -->

View File

@ -4,7 +4,7 @@
<url>
<loc>https://alanorth.github.io/cgspace-notes/2018-11/</loc>
<lastmod>2018-11-06T00:04:18+02:00</lastmod>
<lastmod>2018-11-06T11:36:04+02:00</lastmod>
</url>
<url>
@ -194,7 +194,7 @@
<url>
<loc>https://alanorth.github.io/cgspace-notes/</loc>
<lastmod>2018-11-06T00:04:18+02:00</lastmod>
<lastmod>2018-11-06T11:36:04+02:00</lastmod>
<priority>0</priority>
</url>
@ -205,7 +205,7 @@
<url>
<loc>https://alanorth.github.io/cgspace-notes/tags/notes/</loc>
<lastmod>2018-11-06T00:04:18+02:00</lastmod>
<lastmod>2018-11-06T11:36:04+02:00</lastmod>
<priority>0</priority>
</url>
@ -217,13 +217,13 @@
<url>
<loc>https://alanorth.github.io/cgspace-notes/posts/</loc>
<lastmod>2018-11-06T00:04:18+02:00</lastmod>
<lastmod>2018-11-06T11:36:04+02:00</lastmod>
<priority>0</priority>
</url>
<url>
<loc>https://alanorth.github.io/cgspace-notes/tags/</loc>
<lastmod>2018-11-06T00:04:18+02:00</lastmod>
<lastmod>2018-11-06T11:36:04+02:00</lastmod>
<priority>0</priority>
</url>