Skip to content

simple foreign keys

Bengfort requested to merge spike-foreign-keys-simple into master

This spike simply adds ForeignKeys from AttributeSet and ParticipationRequest to Subject. It turns out this does not really change anything: Of the 13 times we call resolve_pseudonym(), this only eliminates 1. (The numbers are to e taken with a grain of salt because it is not clear what to count…)

I guess there are several reasons for that:

  • Contact contains the privacy level of a person (see #42 (closed))
  • the identifier used in subject management URLs is the contact pseudonym
  • AttributeSet and ParticipationRequest still have pseudonyms, so a pseudonym needs to be resolve on creation

Concerning the statistics (see !465 (closed)), this does eliminate the call to resolve_pseudonym() from the statistics gathering. So it would improve the performance of the statistics (assuming that the pseudonym service could be external and therefore slow).

The optimization that was done in this branch is rather naive. It might be possible to do more if you look at it from afar.

Edited by Bengfort

Merge request reports