Re: [Boost-bugs] [Boost C++ Libraries] #1670: wave almost unusably slow on real-world input

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #1670: wave almost unusably slow on real-world input
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2008-03-05 04:31:19


#1670: wave almost unusably slow on real-world input
--------------------------------------+-------------------------------------
  Reporter: stefan | Owner: hkaiser
      Type: Bugs | Status: reopened
 Milestone: Boost 1.36.0 | Component: wave
   Version: Boost Development Trunk | Severity: Problem
Resolution: | Keywords:
--------------------------------------+-------------------------------------
Changes (by stefan):

  * status: closed => reopened
  * resolution: worksforme =>

Comment:

 What were the flags you preprocessed this file with ? Which compiler were
 you emulating ? I noticed it makes quite a difference what macros are
 predefined, presumably because certain chunks of (boost) code are only
 enabled with the appropriate macro definitions. It seems entirely possible
 that large chunks of boost code are simply skipped as the presumed
 compiler represented by wave was not detected as 'supported'.

 Please find attached two python scripts that help you run wave in
 'compiler emulation' mode.
 (Please make some obvious adjustments to the code to make it work for
 you.)

 I run it as 'python wave.py -S /usr/include/python2.5 -S boost
 boost/boost/python.hpp'.

 calling the wave applet without any compiler emulation flags takes indeed
 only a couple of seconds. However, using flags to emulate GCC (on my
 Fedora 8 laptop) makes it run much longer (in fact, it is still running,
 so I can't tell you the total time.)
 (I notably see wave spend quite some time in boost's funny preprocessor
 loop construct, which is used in different places.)

 I'd be happy to contribute this code (with some suitable changes) to the
 boost.wave project. I'm sure others may find it useful, too.

 Here is how it works:

 The wave.py file calls Emulator.get_compiler_info('C++', 'c++') to find
 compiler-specific (system) search paths as well as predefined macros. (The
 Emulator module will use some heuristics to query those flags for
 compilers it knows, such as GCC and cl. Those data then get cached under
 ~/.synopsis...)

--
Ticket URL: <http://svn.boost.org/trac/boost/ticket/1670#comment:4>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.


This archive was generated by hypermail 2.1.7 : 2017-02-16 18:49:57 UTC