mirror of
https://github.com/commercialhaskell/stackage-server.git
synced 2026-01-28 20:00:24 +01:00
TEMP: gut out expensive queries
This commit is contained in:
parent
a24d962151
commit
220a57da4c
@ -100,7 +100,7 @@ handlePackage epi = do
|
|||||||
in if ms == authors
|
in if ms == authors
|
||||||
then []
|
then []
|
||||||
else ms
|
else ms
|
||||||
mdisplayedVersion = msppi >>= sppiVersion
|
mdisplayedVersion = Nothing
|
||||||
defaultLayout $ do
|
defaultLayout $ do
|
||||||
setTitle $ toHtml pname
|
setTitle $ toHtml pname
|
||||||
$(combineScripts 'StaticR [js_highlight_js])
|
$(combineScripts 'StaticR [js_highlight_js])
|
||||||
|
|||||||
@ -497,7 +497,6 @@ getSnapshotPackagePageInfo spi maxDisplayedDeps =
|
|||||||
if reverseDepsCount > 0
|
if reverseDepsCount > 0
|
||||||
then getReverseDeps spi (Just maxDisplayedDeps)
|
then getReverseDeps spi (Just maxDisplayedDeps)
|
||||||
else pure []
|
else pure []
|
||||||
latestInfo <- getLatests (spiPackageName spi)
|
|
||||||
moduleNames <- getModuleNames (spiSnapshotPackageId spi)
|
moduleNames <- getModuleNames (spiSnapshotPackageId spi)
|
||||||
mcabalBlobKey <- traverse getBlobKey $ spiCabalBlobId spi
|
mcabalBlobKey <- traverse getBlobKey $ spiCabalBlobId spi
|
||||||
pure
|
pure
|
||||||
@ -508,7 +507,6 @@ getSnapshotPackagePageInfo spi maxDisplayedDeps =
|
|||||||
, sppiForwardDepsCount = forwardDepsCount
|
, sppiForwardDepsCount = forwardDepsCount
|
||||||
, sppiReverseDeps = map (first dropVersionRev) reverseDeps
|
, sppiReverseDeps = map (first dropVersionRev) reverseDeps
|
||||||
, sppiReverseDepsCount = reverseDepsCount
|
, sppiReverseDepsCount = reverseDepsCount
|
||||||
, sppiLatestInfo = latestInfo
|
|
||||||
, sppiModuleNames = moduleNames
|
, sppiModuleNames = moduleNames
|
||||||
, sppiPantryCabal =
|
, sppiPantryCabal =
|
||||||
mcabalBlobKey RIO.<&> \cabalBlobKey ->
|
mcabalBlobKey RIO.<&> \cabalBlobKey ->
|
||||||
@ -517,16 +515,6 @@ getSnapshotPackagePageInfo spi maxDisplayedDeps =
|
|||||||
, pcVersion = spiVersion spi
|
, pcVersion = spiVersion spi
|
||||||
, pcCabalKey = cabalBlobKey
|
, pcCabalKey = cabalBlobKey
|
||||||
}
|
}
|
||||||
, sppiVersion =
|
|
||||||
listToMaybe
|
|
||||||
[ spiVersionRev spi
|
|
||||||
| VersionRev ver mrev <-
|
|
||||||
maybe [] (pure . hciVersionRev) mhciLatest ++
|
|
||||||
map liVersionRev latestInfo
|
|
||||||
, ver > curVer ||
|
|
||||||
(ver == curVer &&
|
|
||||||
fromMaybe (Revision 0) mrev > fromMaybe (Revision 0) mcurRev)
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
where
|
where
|
||||||
VersionRev curVer mcurRev = spiVersionRev spi
|
VersionRev curVer mcurRev = spiVersionRev spi
|
||||||
|
|||||||
@ -249,11 +249,8 @@ data SnapshotPackagePageInfo = SnapshotPackagePageInfo
|
|||||||
-- ^ Limited list of packages in the snapshot that depend on this package
|
-- ^ Limited list of packages in the snapshot that depend on this package
|
||||||
, sppiReverseDepsCount :: !Int
|
, sppiReverseDepsCount :: !Int
|
||||||
-- ^ Count of all packages in the snapshot that depends on this package
|
-- ^ Count of all packages in the snapshot that depends on this package
|
||||||
, sppiLatestInfo :: ![LatestInfo]
|
|
||||||
, sppiModuleNames :: !(Map ModuleNameP Bool)
|
, sppiModuleNames :: !(Map ModuleNameP Bool)
|
||||||
, sppiPantryCabal :: !(Maybe PantryCabal)
|
, sppiPantryCabal :: !(Maybe PantryCabal)
|
||||||
, sppiVersion :: !(Maybe VersionRev)
|
|
||||||
-- ^ Version on this page. Should be present only if different from latest
|
|
||||||
}
|
}
|
||||||
|
|
||||||
toRevMaybe :: Revision -> Maybe Revision
|
toRevMaybe :: Revision -> Maybe Revision
|
||||||
|
|||||||
@ -24,21 +24,6 @@ $newline never
|
|||||||
#{url}
|
#{url}
|
||||||
|
|
||||||
<table>
|
<table>
|
||||||
$maybe displayedVersion <- mdisplayedVersion
|
|
||||||
<tr>
|
|
||||||
<td align=right>Version on this page:
|
|
||||||
<td>
|
|
||||||
<span .version>#{displayedVersion}
|
|
||||||
$maybe sppi <- msppi
|
|
||||||
$forall li <- sppiLatestInfo sppi
|
|
||||||
<tr>
|
|
||||||
<td align="right">
|
|
||||||
<a href=@{SnapshotR (liSnapName li) StackageHomeR}>
|
|
||||||
#{snapshotPrettyNameShort (liSnapName li)}
|
|
||||||
:
|
|
||||||
<td>
|
|
||||||
<span .version>
|
|
||||||
<a href=@{SnapshotR (liSnapName li) (StackageSdistR (PNVName pname))}>#{liVersionRev li}
|
|
||||||
$maybe hciLatest <- mhciLatest
|
$maybe hciLatest <- mhciLatest
|
||||||
<tr>
|
<tr>
|
||||||
<td align="right">Latest on Hackage:
|
<td align="right">Latest on Hackage:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user