in reply to Libxml parser cosuming 100% cpu

Consider using your operating system's ability to run processes at a lower priority. If you're using Linux, check out the nice command.

Replies are listed 'Best First'.
Re^2: Libxml parser cosuming 100% cpu
by hippo (Archbishop) on Aug 11, 2018 at 08:58 UTC
    If you're using Linux

    or *BSD or Solaris or in fact anything which is POSIX compliant.

Re^2: Libxml parser cosuming 100% cpu
by ikegami (Patriarch) on Aug 11, 2018 at 12:46 UTC

    The OP wants their program to run faster, not slower.

      Personally I read it as an X/Y problem thing. It taking 2.5 minutes to run is bad because during those 2.5 minutes, the CPU is so busy that other programs freeze up. If the script didn't freeze up the computer, it taking 5 or even 10 minutes might be more acceptable.

      run faster, not slower

      Well, you could read it like have the rest of the programmes run nicer to make the important one faster.

      However, the nice(1) command may modify niceness both ways, so you can indeed use it to prioritize a single process.

      Still, with the process in question already clogging all available cpu, I wonder if it is any help at all.

      Cheers, Sören

      Créateur des bugs mobiles - let loose once, run everywhere.
      (hooked on the Perl Programming language)

        I'm not sure what your point is. I replied to a comment that specifically suggested lowering the priority.

        And sure, one could use it to increase its priority, but that's not what the comment suggested, and I doubt it would help.