[% setvar title Replace Exporter by a better scaling mechanism %]

This file is part of the Perl 6 Archive

Note: these documents may be out of date. Do not use as reference!

To see what is currently happening visit http://www.perl6.org/

TITLE

Replace Exporter by a better scaling mechanism

VERSION

  Maintainer: Ilya Zakharevich <ilya@math.ohio-state.edu>
  Date: 15 Sep 2000
  Mailing List: perl6-stdlib@perl.org
  Number: 233
  Version: 1
  Status: Developing

ABSTRACT

This RFC proposes a minimal efficient well-scaling mechanism for exporting. Only export of subroutines and tags are supported by this mechanism.

DESCRIPTION

Exporter gives an enormous efficiency hit for modules with a large list of exportable symbols (but which are very small nevertheless, say, because everything is autoloaded). It is supposed to be optimized for speed, with a lot of caching and keeping things close at hand. However, all these actions are in fact only slowing things down, since they create a lot of code to compile, and a lot of data structures to maintain.

In many cases the Exporter-support data creates up to 90% of memory overhead of the module (so may be supposed to provide a similar fraction of the load time overhead).

Lessons learned:

MIGRATION ISSUES

None.

IMPLEMENTATION

Straightforward.

REFERENCES

None.