johnberena / quantdesk

Automatically exported from code.google.com/p/quantdesk
0 stars 0 forks source link

stock scanning feature is unacceptably slow #28

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Stock scanning currently is extremely long-running task:

       STATUS: Scanning stock HAL (Halliburton Co.). 66 of 6587 stocks
scanned (1%).1035 seconds elapsed.

So, for 100% it will be roughly 100'000 seconds or approximately 28 hours.

Scanning 1 stock takes some 5-30 seconds, because for every stock there's a
   StockModel.getStockData(Stock) -> new MyYahooStockHistoryServer()
-> buildHistory()  ->
getResponseBodyAsStringBasedOnProxyAuthOption(String request)
call chain.

In other words: for every stock the application retrieves the history
data from Yahoo (HTTP call). The speed thus depends on the Internet
connection, but I don't think it's possible under 2-3 seconds per
stock anyway.

=================================

The current implementation of the scanner definitely does not seem very smart 
at all. It should work with local data and should be VERY fast. So, that needs 
to be fixed... 

Original issue reported on code.google.com by atra...@gmail.com on 20 Sep 2010 at 12:32