Preliminary Documentation for SMF Context Menu


SMF log file

All of the logging options are on the SMF context menu (right mouse click within the workbook). You'd first do:

> SMF > Logging > Enable

...to enable logging. What this does is tell the add-in to append a line to a file (smf-log.csv) in your add-in folder each time the add-in has to go to the Internet to grab a web page or a file. Later on, you can view the log using the context menu:

> SMF > Logging > Open Log File

...which will open the CSV file and put headers on the columns. The resulting worksheet will look something like:

Time StampDurationCalled URL
2017-12-30 20:18:100.2344http://quicktake.morningstar.com/fundnet/printreport.aspx?symbol=CRAK
2017-12-30 20:18:100.1797https://download.finance.yahoo.com/d/quotes.csv?s=XLY&f=sp2&e=.ignore
2017-12-30 20:18:100.8984https://finance.yahoo.com/q/ks?s=LNCOQ
2017-12-30 20:18:110.7500https://finance.yahoo.com/q/ks?s=MLPQ
2017-12-30 20:18:120.0547https://download.finance.yahoo.com/d/quotes.csv?s=XLP&f=sp2&e=.ignore
2017-12-30 20:18:120.8750https://finance.yahoo.com/q/ks?s=XLF

My logging is always enabled. What I'll sometimes do is close all all workbooks except the one I want to test. Then run the smfForceRecalculation macro and open the log file. Then I can see all of the web pages that workbook had to retrieve when I did the smfForceRecalculation.

For some of my quotes retrieval workbooks, I've been able to get them down to a single Internet request by reviewing the logs.

The average duration is usually very small, but hundreds of them in a workbook can add up. Some web sites can be slow, taking several seconds per request. If you do get a duration of near 60 seconds (or more), it usually means the web site is down and the request timed out. I was getting a lot of timeouts from OptionsXpress earlier in the year, which is why I had stopped using them for options data.