Commit 05b3aef
committed
feat: optimize packagejson cache with concurrent-safe sync/atomic and SyncMap
- Replaced sync.RWMutex with atomic.Bool for thread-safe readonly flag
- Switched to collections.SyncMap for concurrent cache access
- Updated getPackageJsonInfo to use new IsReadonly() method
- Added SetReadonly method for efficient readonly state management
- Enhanced Get/Set operations for improved performance and thread safety1 parent 1ee2ba9 commit 05b3aef
2 files changed
+20
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1669 | 1669 | | |
1670 | 1670 | | |
1671 | 1671 | | |
1672 | | - | |
| 1672 | + | |
1673 | 1673 | | |
1674 | 1674 | | |
1675 | 1675 | | |
| |||
1678 | 1678 | | |
1679 | 1679 | | |
1680 | 1680 | | |
1681 | | - | |
| 1681 | + | |
1682 | 1682 | | |
1683 | 1683 | | |
1684 | 1684 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
121 | 122 | | |
122 | 123 | | |
123 | 124 | | |
124 | | - | |
125 | | - | |
126 | | - | |
| 125 | + | |
| 126 | + | |
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
139 | | - | |
140 | | - | |
141 | 139 | | |
142 | | - | |
143 | | - | |
144 | | - | |
| 140 | + | |
| 141 | + | |
145 | 142 | | |
146 | | - | |
| 143 | + | |
147 | 144 | | |
148 | 145 | | |
149 | 146 | | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
| 147 | + | |
| 148 | + | |
155 | 149 | | |
156 | | - | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
157 | 160 | | |
0 commit comments