Houdah Software Forums
Register Latest Topics
 
 
 


Reply
  Author   Comment  
DeepYogurt

Registered:
Posts: 21
 #1 
Am using HoudahSpot 3.9.10 on Sierra 10.12.4 - and am puzzled by it's CPU usage. It's just sitting there and using up to 37% of cpu as viewed from a periodic command line of "ps -p980 -opid -opcpu -ocomm -c" (where 980 is the process id of HoudahSpot). What's it doing using CPU when it's just sitting there? I have a couple of search windows up that have already given me the search results I was looking for. Do I need to close search window after I find what I need?

Is this a known behavior? Was very surprised to see this for what I thought was a program just sitting there doing nothing except waiting for the next search. Perhaps you might think about adding a "Search" button that really initiates a search once rather than keep searching constantly if thats how HoudahSpot really works?

Thanks...
0
houdah

Moderator
Registered:
Posts: 2,906
 #2 
Hi!

Searches indeed remain active: results are updated as new files appear on disk. Unless you are modifying many files that match the searches, you should however not see much CPU usage from HoudahSpot. It will only spring into action when a new match is found in the Spotlight index.

In a quick test, I found both HoudahSpot 3.9 and 4.3 to drop to 0% CPU only seconds after search results had finished loading.

Please try the following the next time you see excessive CPU usage:

1. Open /Applications/Utilities/Activity Monitor.app

2. Select HoduahSpot from the list of processes in the Activity Monitor window

3. Select Sample Process from the view menu

4. This will compile a report of HoudahSpot's current activities

5. Please save the report and send me the file

 
Best,

Pierre Bernard
Houdah Software s.à r.l.


__________________
Houdah Software s. à r. l.
https://www.houdah.com

HoudahGeo: One-stop photo geocoding
HoudahSpot: Advanced file search utility
Tembo: Easy and effective file search
0
DeepYogurt

Registered:
Posts: 21
 #3 
Pierre, 

I left Houdaspot running and did a simple "ps -p980 -opid -opcpu -ocomm -c  >> houdahspot.txt" every 5 seconds for about an hour, and here is a graph of the values obtained:


well, can't insert the image (why is that - do I need to do something in order to put an image in a post???) so here is the raw data summary (if you wish I can post the 1195 values). Most of the values are small (900 of them were less than 1.0), but of the 1195 values here is how they broke down (yy is a list that contained all the sorted CPU percentages for the 1195 samples, with the greatest value of 43.4%):

In[8]:= BinCounts[yy, {0, 45, 5}]
Out[8]= {1025, 53, 17, 22, 24, 16, 22, 11, 5}


Which is saying that 1025 of the total values were less than 5, 53 were between 5 and 10, 17 were between 10 and 15, ..., and 5 values were between 40 and 45%.

If you would still like the Sample Process info let me know. Here is the simple script I ran to collect the data:

 xxx$ more /usr/local/bin/cputrack

#!/bin/bash

# Usage: cputrack [PID#] [filename]

 

filepath=/Users/bobf/Documents/Process_Tracks     # modify as desired

interval=12                       # reports per minute

timelimit=6000                    # how long to run, in seconds

 

mydate=`date "+%H:%M:%S"`         # the timestamp

freq=$((60/$interval))            # for sleep function

 

while [ "$2" != "" ] ; do

  while [ "$1" != "" ] ; do

    while [ "$SECONDS" -le "$timelimit" ] ; do

      ps -p$1 -opid -opcpu -ocomm -c | grep $1 | sed "s/^/$mydate /" >> $filepath/$2.txt

      sleep $freq

      mydate=`date "+%H:%M:%S"`

    done

  done

done

xxx$ 








0
houdah

Moderator
Registered:
Posts: 2,906
 #4 
Hi!

Occasional spikes are to be expected. Though I expect these to be rather short. I assume that the 5 measurements at 45% CPU represent brief periods of time.

During the hour you watched the CPU, files on the system have been updated or added. If these match an active search, this needs to be refreshed. 

The system may also have HoudahSpot redraw its window as it gets covered by other windows and later revealed.

The recent HoudahSpot 4.3 includes optimizations in loading search results and file metadata. I.e. it will be faster to re-sort and update search results as changes happen. I also expect these operations to use less CPU.

Neither HoudahSpot 3 nor 4 have an option to pause / freeze a search: stop searching, but keep showing the results. This would do away with most of the CPU use you see while HoudahSpot is “inactive”. It would however come at the cost of memory use. You would expect to be able to scroll, sort and otherwise explore the search results. Since files could disappear after the search was paused, HoudahSpot would need to pre-load all file metadata so as to keep the ability to show it after files have been deleted.

Best,

Pierre Bernard
Houdah Software s.à r.l.




__________________
Houdah Software s. à r. l.
https://www.houdah.com

HoudahGeo: One-stop photo geocoding
HoudahSpot: Advanced file search utility
Tembo: Easy and effective file search
0
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.