Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Submit feedback
    • Contribute to GitLab
  • Sign in
H
haskell-gargantext-prelude
  • Project
    • Project
    • Details
    • Activity
    • Releases
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 1
    • Issues 1
    • List
    • Board
    • Labels
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • gargantext
  • haskell-gargantext-prelude
  • Issues
  • #1

Closed
Open
Opened May 23, 2023 by Alfredo Di Napoli@AlfredoDiNapoli
  • Report abuse
  • New issue
Report abuse New issue

Should `gc_max_docs_scrapers` be an `Int`?

Currently gc_max_docs_scrapers is an Integer, and as such this is forcing all the call sites of the scrapers we support to use that, or convert this to Int. It seems to me that using an Integer is wasteful here, because integers in GHCs won't have a fixed size and they occupy more heap memory. Here, however, it seems unnecessary to use Integers, unless there is something I'm not considering. I understand that potentially a scraper can return millions of results, but in practice, gc_max_docs_scrapers is used to set a limit over the number of results returned, and it seems to me we should be just fine with current Int's maxbound, which is 9223372036854775807 on most[1] machines.

[1] I say "most" because technically speaking GHC transparently switches to Int32 or Int64 internally depending on the architecture, but these days we are running on 64 bits anyway.

@cgenie @anoe am I missing something?

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
0
Labels
None
Assign labels
  • View project labels
Reference: gargantext/haskell-gargantext-prelude#1