[tex4ht] what is the fastest way to convert large document to HTML?

Reinhard Kotucha reinhard.kotucha at web.de
Mon Aug 20 22:37:20 CEST 2018


On 2018-08-19 at 22:36:37 +0200, Reinhard Kotucha wrote:

 > local cpu_cnt = 4  -- set a reasonable default for non-Linux systems
 > 
 > if os.name == 'linux' then
 >   cpu_cnt = 0
 >   local cpuinfo=assert(io.open('/proc/cpuinfo', 'r'))
 >   for line in cpuinfo:lines() do
 >     if line:match('^processor') then
 >       cpu_cnt = cpu_cnt + 1
 >     end
 >   end
 >   cpuinfo:close()
 > end

if os.name == 'cygwin' or os.type == 'windows' then
  local nop = os.getenv('NUMBER_OF_PROCESSORS')
  if tonumber(nop) then
    cpu_cnt = nop
  end
end

------------

I checked today at work.  Cygwin inherits the environment from
Windows.   Don't know whether it works with other releases than
Windows 7.

Regards,
  Reinhard

-- 
------------------------------------------------------------------
Reinhard Kotucha                            Phone: +49-511-3373112
Marschnerstr. 25
D-30167 Hannover                    mailto:reinhard.kotucha at web.de
------------------------------------------------------------------


More information about the tex4ht mailing list