Skip to content

Commit

Permalink
Merge pull request #24 from JPMoresmau/master
Browse files Browse the repository at this point in the history
Performance improvement
  • Loading branch information
serras committed Mar 2, 2012
2 parents d746305 + ff28896 commit 19239b2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Scion/PersistentBrowser/Build.hs
Expand Up @@ -66,7 +66,8 @@ saveHackageDatabase file = withTemporaryDirectory (saveHackageDatabaseWithTmp fi

saveHackageDatabaseWithTmp :: FilePath -> FilePath -> IO ()
saveHackageDatabaseWithTmp file tmp = do (db, _) <- createHackageDatabase tmp
mapM_ (\pkg -> withSqliteConn (T.pack file) (runSqlConn (savePackageToDb pkg))) db
withSqliteConn (T.pack file) (runSqlConn (mapM_ savePackageToDb db))
--mapM_ (\pkg -> withSqliteConn (T.pack file) (runSqlConn (savePackageToDb pkg))) db

-- | Downloads the information for the entire Hackage database
-- creating an in-memory database with it.
Expand Down
3 changes: 3 additions & 0 deletions src/Scion/PersistentHoogle/Parser.hs
Expand Up @@ -39,6 +39,9 @@ catMaybesM (x:xs) = do y <- x

hoogleElements' :: BSParser [HalfResult]
hoogleElements' = try (do spaces0
optional $ try (do
string "No results found"
spacesOrEol0)
eof
return [])
<|> (do first <- hoogleElement
Expand Down

0 comments on commit 19239b2

Please sign in to comment.