bugGNU Octave - Bugs: bug #39479, 'pkg -forge list' takes 56.5...


bug #39479: 'pkg -forge list' takes 56.5 seconds

Submitted by:  Rik <rik5>
Submitted on:  Sat Jul 13 17:40:33 2013  
Category: Octave FunctionSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Performance
Status: ConfirmedAssigned to: None
Originator Name: Open/Closed: Open
Release: devOperating System: Any

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

Please log in, so followups can be emailed to you.


(Jump to the original submission Jump to the original submission)

Thu Nov 24 00:35:48 2016, comment #9:

The problem is still there in Octave 4.3.0+

Juan Pablo Carbajal <juanpi>
Thu Jun 16 13:22:21 2016, comment #8:

@Mike (comment #5)

The php scripts that you're looking for are in the project-web repository, in htdocs:


Julien Bect <jbect>
Thu Jun 16 13:19:51 2016, comment #7:

I meant "still takes"

Julien Bect <jbect>
Thu Jun 16 13:18:55 2016, comment #6:

tic; pkg list -forge; toc

stills taks approximately 30 seconds on Octave 4.0.2

Julien Bect <jbect>
Sun Jul 28 17:10:30 2013, comment #5:

I could not find any *.php scripts in the octave-forge SVN.

So the process will be you or someone else runs a script to update a hosted static file every time a new Forge package release is made?

Should the format of this file be the same as the struct saved in the local packages cache file (~/.octave_packages) so we can reuse the code that understands that structure?

Mike Miller <mtmiller>
Project Administrator
Wed Jul 17 21:14:47 2013, comment #4:

I think there's a copy of the scripts on the SVN repository.

Anyway, that has been discussed before on the mailing. It was agreed that the best solution was to have an octave struct saved in a text file and hosted in octave.org. That would have the advantage of keep working if octave forge ever moves to another server, and that be very easy for pkg to read.

Carnë Draug <carandraug>
Project Member
Wed Jul 17 18:53:24 2013, comment #3:

A workaround is to use

which completes much faster, but only lists the names of available packages without their versions.

A real solution to this will probably involve an improved server-side script that returns all the information needed in some structured format like XML, JSON, or even CSV. The pkg function can then get everything it needs from one URL fetch instead of tens of URLs.

Can anyone comment where are the Octave Forge server-side scripts maintained, for example list_packages.php and packages.php?

Mike Miller <mtmiller>
Project Administrator
Tue Jul 16 18:19:01 2013, comment #2:

In addition, the listing of packages doesn't bother to respect the pager - it just scrolls on and on ....

Philip Nienhuis <philipnienhuis>
Project Member
Sat Jul 13 21:18:59 2013, comment #1:

Using a tic (); pkg -forge list; toc (), says

Which is faster than Rik's result, but still too slow (imo).

Ben Abbott <bpabbott>
Project Member
Sat Jul 13 17:40:33 2013, original submission:

This is overwhelmingly slow and discourages using the built-in interface. It is faster to actually go to the octave-forge website to browse around.

The problem seems to be that get_forge_pkg is called on each package name and each call takes ~0.5 seconds. It might be easiest just to maintain a list of the Octave-Forge packages and their version numbers somewhere "magic" on the Octave-Forge site that the pkg command could fetch with urlread.

Rik <rik5>
Project Administrator


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):

No files currently attached


Depends on the following items: None found

   bug dependencies.


Carbon-Copy List
  • -unavailable- added by juanpi (Posted a comment)
  • -unavailable- added by jbect (Posted a comment)
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by bpabbott (Posted a comment)
  • -unavailable- added by rik5 (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue Feb 9 18:47:59 2016rik5Dependencies-=>bugs #47102 is dependent
    Sat Jul 13 21:18:59 2013bpabbottStatusNone=>Confirmed

    Back to the top

    Powered by Savane 3.1-cleanup1