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 13 Jul 2013 05:40:33 PM UTC  
Category:  Octave Function Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Performance
Status:  Confirmed Assigned to:  None
Originator Name:  Open/Closed:  Open
Release:  dev Operating System:  Any

Add a New Comment(Rich Markup)

You are not logged in

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


( Jump to the original submission)

Thu 24 Nov 2016 12:35:48 AM UTC, comment #9:

The problem is still there in Octave 4.3.0+

Juan Pablo Carbajal <juanpi>
Project Member
Thu 16 Jun 2016 01:22:21 PM UTC, 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 16 Jun 2016 01:19:51 PM UTC, comment #7:

I meant "still takes"

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

tic; pkg list -forge; toc

stills taks approximately 30 seconds on Octave 4.0.2

Julien Bect <jbect>
Sun 28 Jul 2013 05:10:30 PM UTC, 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 17 Jul 2013 09:14:47 PM UTC, 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 17 Jul 2013 06:53:24 PM UTC, 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 16 Jul 2013 06:19:01 PM UTC, 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 13 Jul 2013 09:18:59 PM UTC, 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 13 Jul 2013 05:40:33 PM UTC, 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 Files:

No files currently attached


Depends on the following items: None found

   bug dependencies.


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

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

    Only project members can vote.




    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-02-09 rik5 Dependencies- => bugs #47102 is dependent
    2013-07-13 bpabbott StatusNone => Confirmed

    Back to the top

    Powered by Savane 3.4