Project

General

Profile

Feature #8703

Tag suggestion generation should be faster

Added by James C. McPherson over 5 years ago. Updated over 5 years ago.

Status:
Fixed
Priority:
Low
Category:
Lighttable
Start date:
Due date:
% Done:

100%

Affected Version:
System:
bitness:
64-bit
hardware architecture:
amd64/x86

Description

At present, tag suggestion generation is very slow. The
select/insert/join query in dt_tag_generate_suggestions()
is difficult to parse, and very computationally expensive
to run.

Timing using DTrace reveals that with a tag table of around
400 entries, suggestion generation frequently takes 7 to 10
seconds per keystroke typed in the tagging widget.

This can and should be improved.

History

#1 Updated by James C. McPherson over 5 years ago

The meat of the changeset is dt_tag_get_suggestions, which is commented heavily.

The gist of the change is to use an in-memory table for the set of possible tags
to compare with; using another in-memory table to store the results of select
queries against tagxtag, and then as the last step reporting the tag ids and their
names via a join against tags.name.

#2 Updated by James C. McPherson over 5 years ago

  • % Done changed from 0 to 100
  • Target version changed from Future to Candidate for next patch release
  • Status changed from New to Fixed
  • Category changed from General to Lighttable
  • Tracker changed from Bug to Feature

Also available in: Atom PDF