Skip to content

Reduce Compilation Time by Refactoring Include Directives and/or hpp-cpp Implementation Divisions #1803

Open

Description

@crypto-ape

Hey Monkeys!

User Story
As the (ape) programmer I want (banana) fast compilation time so that it is easier to work with the code base.

I would like to try reducing the compilation time with the two following approaches:

  • refactor include directives: They are pretty messy and many files include unneeded files.
  • refactor hpp/cpp implementations: Maybe some often-included headers including implementations could be factored out into cpp files providing some benefits for the compilation time.

Impacts

  • API (the application programming interface)
  • Build (the build process or something prior to compiled code)
  • CLI (the command line wallet)
  • Deployment (the deployment process after building such as Docker, Travis, etc.)
  • DEX (the Decentralized EXchange, market engine, etc.)
  • P2P (the peer-to-peer network for transaction/block propagation)
  • Performance (system or user efficiency, etc.)
  • Protocol (the blockchain logic, consensus, validation, etc.)
  • Security (the security of system or user data, etc.)
  • UX (the User Experience)
  • Other (please add below)

CORE TEAM TASK LIST

  • Evaluate / Prioritize Feature Request
  • Refine User Stories / Requirements
  • Define Test Cases
  • Design / Develop Solution
  • Perform QA/Testing
  • Update Documentation

Ape out!

Activity

  1. oxarbitrage commented on Jun 17, 2019

    @oxarbitrage
    Member

    I agree on giving this a try even if i am not sure how much time we will be able to really reduce in compilation with the described techniques.

    We will accept any pull request that removes non needed headers, guaranteed.

    Metrics on before and after changes can be done. Please note that we should use develop branch as there are already made improvements in compile time thanks to #1768

    A further 10% (or more) reduction in compile time in my opinion will be good enough if we don't have to sacrifice anything.

    Let us know how much hours do you plan to invest in this research initially.

  2. pmconrad commented on Jun 18, 2019

    @pmconrad
    Contributor

    You should definitely base any work in that direction on #1768 to avoid duplicate effort.
    I doubt that removing includes will bring a large improvement, thanks to pragma once.
    During #1768 I have tried a few things (e. g. instantiating index templates and object_ids explicitly) that I later rolled back again because they had a devastating effect on runtime performance. Please keep an eye on that.

  3. abitmore commented on Sep 12, 2019

    @abitmore
    Member

    Is this still needed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions