Closed Tatsh closed 5 years ago
Performance is kind of random. A 1.9 MiB image of my cat takes about 2 minutes to process (which is really unusable in the context of a web server handling POST data). I profiled this run:
783201 44.737 0.000 44.739 0.000 .../site-packages/nude.py:147(_add_merge) 4906 19.164 0.004 19.164 0.004 /usr/lib64/python2.7/copy.py:113(_copy_with_constructor) 1 18.591 18.591 105.226 105.226 .../site-packages/nude.py:80(parse) 1 17.738 17.738 36.937 36.937 .../site-packages/nude.py:181(_merge) 12192768 2.073 0.000 2.073 0.000 {skin_classifier.skin_classifier} 12192768 1.819 0.000 3.892 0.000 .../site-packages/nude.py:279(_classify_skin)
This is sorted by total time.
_add_merge
copy
_classify_skin
Performance is kind of random. A 1.9 MiB image of my cat takes about 2 minutes to process (which is really unusable in the context of a web server handling POST data). I profiled this run:
This is sorted by total time.
_add_merge
is called a lot, and also takes a lot of time overall, not in itselfcopy
are expensive, somewhat expected; would have to figure out a way to avoidcopy
calls_classify_skin
should be converted to C if possible?