Projects STRLCPY graphql-engine Commits 5b4b8527
🤬
  • server: force some thunks

    Just forcing some of the most numerous thunks (with -hi profiling), it
    seems some of these were retaining significant amount of data
    
    GitOrigin-RevId: 4d7b22d1016330d31b19da96282b68bbed5f1907
  • Loading...
  • Brandon Simmons committed with hasura-bot 2 months ago
    5b4b8527
    1 parent b6e196b9
  • ■ ■ ■ ■
    server/src-lib/Hasura/GraphQL/Schema/BoolExp.hs
    skipped 84 lines
    85 85   FieldInfo b ->
    86 86   m (Maybe (InputFieldsParser n (Maybe (AnnBoolExpFld b (UnpreparedValue b)))))
    87 87   mkField fieldInfo = runMaybeT do
    88  - roleName <- retrieve scRole
     88 + !roleName <- retrieve scRole
    89 89   fieldName <- hoistMaybe $ fieldInfoGraphQLName fieldInfo
    90 90   P.fieldOptional fieldName Nothing <$> case fieldInfo of
    91 91   -- field_name: field_type_comparison_exp
    skipped 147 lines
  • ■ ■ ■ ■
    server/src-lib/Hasura/GraphQL/Schema/OrderBy.hs
    skipped 83 lines
    84 84   roleName <- retrieve scRole
    85 85   case fieldInfo of
    86 86   FIColumn columnInfo -> do
    87  - let fieldName = ciName columnInfo
     87 + let !fieldName = ciName columnInfo
    88 88   pure $
    89 89   P.fieldOptional
    90 90   fieldName
    skipped 164 lines
  • ■ ■ ■ ■ ■ ■
    server/src-lib/Hasura/GraphQL/Schema/Select.hs
    skipped 910 lines
    911 911   mkNumericAggFields name
    912 912   | name == Name._sum = traverse mkColumnAggField
    913 913   | otherwise = traverse \columnInfo ->
    914  - pure $
    915  - P.selection_
    916  - (ciName columnInfo)
    917  - (ciDescription columnInfo)
    918  - (P.nullable P.float)
    919  - $> IR.CFCol (ciColumn columnInfo) (ciType columnInfo)
     914 + pure $! do
     915 + let !cfcol = IR.CFCol (ciColumn columnInfo) (ciType columnInfo)
     916 + P.selection_
     917 + (ciName columnInfo)
     918 + (ciDescription columnInfo)
     919 + (P.nullable P.float)
     920 + $> cfcol
    920 921   
    921 922   mkColumnAggField :: ColumnInfo b -> m (FieldParser n (IR.ColFld b))
    922 923   mkColumnAggField columnInfo = do
    skipped 66 lines
    989 990   let columnName = ciColumn columnInfo
    990 991   selectPermissions <- hoistMaybe $ tableSelectPermissions roleName tableInfo
    991 992   guard $ columnName `Map.member` spiCols selectPermissions
    992  - let caseBoolExp = join $ Map.lookup columnName (spiCols selectPermissions)
    993  - caseBoolExpUnpreparedValue =
    994  - (fmap . fmap) partialSQLExpToUnpreparedValue <$> caseBoolExp
     993 + let !caseBoolExp = join $ Map.lookup columnName (spiCols selectPermissions)
     994 + !caseBoolExpUnpreparedValue =
     995 + (fmap . fmap) partialSQLExpToUnpreparedValue <$!> caseBoolExp
    995 996   pathArg = scalarSelectionArgumentsParser $ ciType columnInfo
    996 997   -- In an inherited role, when a column is part of all the select
    997 998   -- permissions which make up the inherited role then the nullability
    skipped 16 lines
    1014 1015   -- allow the case analysis only on nullable columns.
    1015 1016   nullability = ciIsNullable columnInfo || isJust caseBoolExp
    1016 1017   field <- lift $ columnParser (ciType columnInfo) (G.Nullability nullability)
    1017  - pure $
     1018 + pure $!
    1018 1019   P.selection fieldName (ciDescription columnInfo) pathArg field
    1019 1020   <&> IR.mkAnnColumnField (ciColumn columnInfo) (ciType columnInfo) caseBoolExpUnpreparedValue
    1020 1021   FIRelationship relationshipInfo ->
    skipped 240 lines
  • ■ ■ ■ ■ ■ ■
    server/src-lib/Hasura/GraphQL/Schema/Table.hs
    skipped 171 lines
    172 172   where
    173 173   canBeSelected _ Nothing _ = pure False
    174 174   canBeSelected _ (Just permissions) (FIColumn columnInfo) =
    175  - pure $ Map.member (ciColumn columnInfo) (spiCols permissions)
     175 + pure $! Map.member (ciColumn columnInfo) (spiCols permissions)
    176 176   canBeSelected role _ (FIRelationship relationshipInfo) = do
    177 177   tableInfo' <- askTableInfo sourceInfo $ riRTable relationshipInfo
    178  - pure $ isJust $ tableSelectPermissions @b role tableInfo'
     178 + pure $! isJust $ tableSelectPermissions @b role tableInfo'
    179 179   canBeSelected role (Just permissions) (FIComputedField computedFieldInfo) =
    180 180   case computedFieldReturnType @b (_cfiReturnType computedFieldInfo) of
    181 181   ReturnsScalar _ ->
    182  - pure $ Map.member (_cfiName computedFieldInfo) $ spiComputedFields permissions
     182 + pure $! Map.member (_cfiName computedFieldInfo) $ spiComputedFields permissions
    183 183   ReturnsTable tableName -> do
    184 184   tableInfo' <- askTableInfo sourceInfo tableName
    185  - pure $ isJust $ tableSelectPermissions @b role tableInfo'
     185 + pure $! isJust $ tableSelectPermissions @b role tableInfo'
    186 186   ReturnsOthers -> pure False
    187 187   canBeSelected _ _ (FIRemoteRelationship _) = pure True
    188 188   
    skipped 46 lines
Please wait...
Page is in error, reload to recover