Opened 3 years ago

Last modified 3 years ago

#1106 new defect

Perl/Create Projects Tagfile cause Padre to freeze

Reported by: szabgab Owned by:
Priority: major Milestone:
Component: Autocomplete Version: 0.80
Keywords: Cc:

Description

Perl/Create? Projects Tagfile cause Padre to freeze
On my Windows netbook it create a lot of load and Padre became unresponsive. I killed it after several minutes.

First of all I think creation of the index file should be automatic
once in a while or upon some event.
It could be controlled by some configuration option.
This menu option could be a manual "re-create" of the index but even then it should not be in the Perl menu as it is should not be Perl specific.

Attachments (1)

perl-tags (943 bytes) - added by gyles19 3 years ago.
Proof-of-concept bash wrapper for perl-tags, for unix-like platforms.

Download all attachments as: .zip

Change History (5)

comment:1 Changed 3 years ago by szabgab

  • Component changed from editor to Autocomplete

comment:2 Changed 3 years ago by gyles19

I experienced this on linux as well, but I deduced that Padre didn't actually crash... it called perl-tags and allowed perl-tags to build a tags file for the entire perl library listed in @INC! This is a HUGE file and takes a long time to generate. Padre seems to have launched this in the foreground instead of as a background task and so stops responding to keyboard/mouse/window events until the perl-tags process finishes.

If you're lucky, you can watch the size of the tags file itself grow over time.

I think this feature should be configurable to allow us to choose whether we want tags generated for every library module installed on the host, or just the files we're actually writing ourselves. (The default for ctags is the latter, I believe.)

I think it would be useful to have a system-default tags file and a project-specific tags file, and merge them together as needed. Keep the system tags up in ~/.padre/perltags and leave project tags in the project directory. Allow the user to generate that system file manually unless Padre figure out for itself when it has gone stale (ie from CPAN upgrades/installs, etc.)

comment:3 Changed 3 years ago by gyles19

In Padre/Document/Perl?.pm, the perl-tags tool is being called without a depth parameter. This is allowing perl-tags to parse infinitely deeply through the project files and out into the system perl library tree. If you inserted a "-d 2" into the command, it would parse at most two levels into the system tree. The resulting perltags file is much smaller and this also greatly reduces the time the gui freezes.

comment:4 Changed 3 years ago by gyles19

Perl-tags as written generates perltags files containing a great deal of duplication. The file is already sorted, simply running it through 'uniq' reduces the size of the tags file from over 18k lines to less than 8k lines.

I have attached a proof-of-concept bash wrapper for the system perl-tags that addresses these issues. Tested on Ubuntu 10.04. Enjoy.

Changed 3 years ago by gyles19

Proof-of-concept bash wrapper for perl-tags, for unix-like platforms.

Note: See TracTickets for help on using tickets.