1

Re: Recording cards taking a long time to save

We've got an issue with saving records using recording cards (and with the Enter a species record... dialog too). It's currently taking around 2 minutes to save a card. I've run some traces on the SQL Server and the delay is happening after the following SQL statement is run:

exec sp_executesql N'SELECT "SE".SURVEY_EVENT_KEY, "SE".VAGUE_DATE_START, "SE".VAGUE_DATE_END, "SE".VAGUE_DATE_TYPE FROM "SURVEY_EVENT" "SE"
WHERE "SE"."SURVEY_KEY" = @P1
AND "SE"."LOCATION_KEY" = ''THU00002000000N5'' AND "SE"."LOCATION_NAME" = '''' OR "SE"."LOCATION_NAME" IS NULL 
ORDER BY SE.LOCATION_NAME DESC
',N'@P1 varchar(16)','THU000020000004A'

However, the delay is not caused by the SQL Server; the delay is actually happening on the client. Once I have clicked save, I am observing one of my CPUs maxing out for the duration of the delay. I have a fast Xeon dual-core processor, so it's not caused by a lack of CPU horsepower.

The issue is also occurring on all of our machines here, so it's not a quirk of my system alone.

I've recorded a screencast of it happening in both the recording card and the Enter a species dialog.

As a side-note, when control is returned to Recorder at about 1 minute 55 seconds, note how the "A taxon occurrence has been saved" box does not appear immediately. This is because it is 'lost' behind the main Recorder window. I have to 'click around' in order to get it to appear (bringing up the task manager eventually does it, but this is by no means a reliable solution). This issue dogs many areas of Recorder where pop box up boxes appear. I think it's caused by switching to another application during a long-running process.

Edit: I should point out that we have ~1.7 million occurrences, but this issue wasn't occurring prior to 6.13, so I don't think this is purely related to the sheer number of records we hold.

Charles Roper
Digital Development Manager | Field Studies Council
http://www.field-studies-council.org | https://twitter.com/charlesroper | https://twitter.com/fsc_digital

2

Re: Recording cards taking a long time to save

Hi Charles

Any chance you could post up the rest of the trace, at least the few entries before and after this query is run? I'd also be interested to see the start time and duration columns for each of the trace entries.

thanks

John van Breda
Biodiverse IT

3

Re: Recording cards taking a long time to save

Sent a couple of traces via email.

Charles Roper
Digital Development Manager | Field Studies Council
http://www.field-studies-council.org | https://twitter.com/charlesroper | https://twitter.com/fsc_digital

4

Re: Recording cards taking a long time to save

Ok, the good news is I've isolated the problem and it's a simple fix, so it will be sorted in the next release of Recorder. The reason it affects Charles is that he is adding records to a very large survey which causes the delay, because of inefficient detection of existing matching survey events.

John van Breda
Biodiverse IT