microsoft / microsoft/react-native-windows

Clean-up global maps and non POD objects

Open
#3,964 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Area: Infrastructure Area: Performance Code Cleanup enhancement nice-to-have Workstream: Performance
Dominant language
C++
Stars
17.3k
Forks
1.2k
Avg merge
1d 13h
Merged PRs (30d)
33

Description

We have a number of std::map / std::unordered_map that map std::string to other things which require dynamic initializers/atexit destructors and make DLL load slower and bloatier. We should remove these.

Relevant guidance: https://google.github.io/styleguide/cppguide.html#Static_and_Global_Variables

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inventorying the global std::map and std::unordered_map instances that map std::string to non-POD objects. Read the linked C++ guidance on static and global variables, then verify that the cleanup removes dynamic initializers and atexit destructors without changing behavior or DLL loading characteristics.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
performance
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.