This is issue is a continuation of
I started my old test server with JIRA 6.3.6 and found a relatively large issue (25.000 entries in the change history), turned on the SQL log and tried to log work with the REST API like this:
Tailing the SQL log it was fairly obvious that this query took the longest (6041ms):
Looks like JIRA is querying the whole changelog upon every new worklog creation!
I also tried this on plain vanilla JIRA (atlas-run-standalone with just the DEMO project installed) and I see that the same query is executed then which means that it is JIRA itself and no plugin that is querying and sorting the whole changelog for every new add.
Please let me know if you need any more information.
P.S. I have JIRA agile (latest version, 6.6.0) on my test and I see that Agile is investigating the changelog as well. Better filter but it all adds up: