Opened 11 years ago

Closed 8 years ago

#312 closed defect (fixed)

Max one outline job per document at a time

Reported by: tsee Owned by:
Priority: critical Milestone:
Component: Outline Version: 0.35
Keywords: Cc:


The Outline should make sure that a maximum of one Outline Task is running in the background for a given document at the same time. Otherwise, for long documents, it may trash the Task queue and grind the computer to a halt.

This isn't very easy but not ridiculously hard either. Note that you can't stop a running task.

Two ways to do this. Either

a) Implement an optional, different queuing scheme in which only the newest copy of a job type (with an additional identifier for the document it's running for!) will be kept in the queue. This would be the general solution and would require significant extensions to the TaskManager?.

b) Implement a sort of workaround in the Outline code itself. Make it only dispatch new Outline Tasks if there is none currently running. Note that too simple-minded approaches can easily yield bugs like the outline view not updating correctly.

Change History (5)

comment:1 Changed 11 years ago by karl.forner

Hi. Could you please give a way to easily reproduce a case where 2 outline tasks are running for the same document ?

comment:2 Changed 10 years ago by zenogantner

This should be rather easy:

  1. Open Padre's
  2. Modify the file
  3. Keep on modifying ;-)

For, calculating the Outline takes (on my computer) more than 5 seconds.
The file is checked about once per second for modifications, and if there is a
modification, a new Outline task is started.
So if a modification happens within those 5 or more seconds, there are more than
two concurrent Outline tasks.

On the other hand, most of the time (in particular for large files, which implies
that they are around for some time and thus possibly rather mature) during development
is spent reading the code, not modifying it, so I am not sure how often we will
create so many tasks that there is a real problem for the user.

tsee, did you encounter this as a real problem, or is it rather theoretical?
If it is more theoretical, I would suggest to lower the priority of the ticket.

comment:3 Changed 9 years ago by szabgab

  • Component changed from editor to Outline

comment:4 Changed 8 years ago by azawawi

Is this still the case with Padre trunk, improved Outline and Task 2.0?

comment:5 Changed 8 years ago by zenogantner

  • Resolution set to fixed
  • Status changed from new to closed

It does not seem to be the case any more. Please re-open if you think it is necessary.

Note: See TracTickets for help on using tickets.