Project

General

Profile

Actions

Bug #10540

closed

wsdiff much slower under python3 than python2

Added by Andy Fiddaman over 4 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Start date:
2019-03-12
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
External Bug:

Description

Under python2, wsdiff uses the commands python module to invoke external commands.
Under python3 is uses the subprocess module.

subprocess appears to be around 5x slower than commands.

Actions #2

Updated by Robert Mustacchi about 4 years ago

The following were testing notes that were submitted as part of the RTI:

Testing:

$ for wsdiff in /opt/onbld/bin/wsdiff ./usr/src/tools/proto/root_i386-nd/opt/onbld/bin/wsdiff ; do printf  "=== Running $wsdiff" ; for  python in python2.7 python3.5; do  printf " using $python\n"; time $python $wsdiff proto-old/ proto >/dev/null; done ; done  
=== Running /opt/onbld/bin/wsdiff using python2.7

real    16m44.762s
user    30m11.186s
sys     28m3.222s
 using python3.5

real    119m40.660s
user    38m27.646s
sys     209m32.909s
=== Running ./usr/src/tools/proto/root_i386-nd/opt/onbld/bin/wsdiff using python2.7

real    16m52.537s
user    30m22.577s
sys     28m17.253s
 using python3.5

real    17m38.005s
user    31m22.273s
sys     29m5.031s

I've also checked that output didn't change. Fix was reviewed by Andy Fiddaman and Richard Lowe. 
Actions #3

Updated by Electric Monk about 4 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 0 to 100

git commit fe949611d4f0a0f42a6923a31cd3073e5b2bc97c

commit  fe949611d4f0a0f42a6923a31cd3073e5b2bc97c
Author: Alexander Pyhalov <apyhalov@gmail.com>
Date:   2019-08-15T15:45:12.000Z

    10540 wsdiff much slower under python3 than python2
    Reviewed by: Andy Fiddaman <omnios@citrus-it.co.uk>
    Reviewed by: Richard Lowe <richlowe@richlowe.net>
    Approved by: Robert Mustacchi <rm@joyent.com>

Actions #4

Updated by Gordon Ross about 4 years ago

Alexander opened this bug against Python 3.5 for those interested:
https://bugs.python.org/issue37790

Actions

Also available in: Atom PDF