Markus Staab
0e16dbabde
Removed another unnecessary abs() call
6 years ago
Markus Staab
e3a23f4ae6
Remove unnecessary abs() calls
...
Literal cannot be negative at this point
6 years ago
Yanick Witschi
d82bdc04ac
Improved debugging output
6 years ago
Yanick Witschi
5435877bd9
Improve SAT resolving developer debug information
6 years ago
Gabriel Caruso
3d262bd637
Fixes from PHPStan level 0
...
More fixes from PHPStan level 0
7 years ago
Jordi Boggiano
122e422682
CS fixes
8 years ago
rubenrua
4e1887a721
Improve memory usage resolving dependencies
...
It is known that composer update takes a lot of memory: #5915 , #5902 ,
I am playing with a profiler (@blackfireio) to make a demo in my local
PHP meetup (@phpvigo) and I found out a way to use less memory. These
are my first tests:
* Private project using PHP 5.6:
* Memory: from 1.31GB to 1.07GB
* Wall Time: from 2min 8s to 1min 33s
* symfony-demo using PHP 7.1 in my old mac book:
* Memory: from 667MB to 523MB
* Wall Time: from 5min 29s to 5min 28s
Not use an array inside conflict rules is this improvement main idea:
```php
<?php
//Memory 38MB
gc_collect_cycles();
gc_disable();
class Rule
{
public $literals;
public function __construct(array $literals)
{
$this->literals = $literals;
}
}
$rules = array();
$i = 0;
while ($i<80000){ //
$i++;
$array = array(-$i, $i);
$rule = new Rule($array);
$rules[] = $rule;
}
```
```php
<?php
//Memory 11.1MB
gc_collect_cycles();
gc_disable();
class Rule2Literals
{
public $literal1;
public $literal2;
public function __construct($literal1, $literal2)
{
$this->literal1 = $literal1;
$this->literal2 = $literal2;
}
}
$rules = array();
$i = 0;
while ($i<80000){ //
$i++;
$rule = new ConflictRule(-$i, $i);
$rules[] = $rule;
}
```
More info https://github.com/composer/composer/pull/6168
8 years ago
Nicolas Grekas
daf84bea33
Enhance solver perf by removing count()
8 years ago
Niels Keurentjes
8e78ce9a43
Add extra logging before and after SAT solving
9 years ago
Niels Keurentjes
b059cbe37c
Removed unused variables and includes, fixed functions being called with more arguments than declared.
9 years ago
Rob Bast
1c7016de45
remove dead code/class
9 years ago
Rob Bast
1bf03e9621
fixed various docblocks and class properties in solver
9 years ago
Rob Bast
b523fc0b7b
ran fixers
9 years ago
Jordi Boggiano
ce08582671
Fix CS
9 years ago
Nils Adermann
6e81f63635
Reduce memory footprint of rules by storing data in blob
...
Not declaring the job property saves significant amounts of memory as
most rules leave it as null
9 years ago
Nils Adermann
5b1b96b61e
Output the number of rules used in the solver for profiling purposes
9 years ago
Nils Adermann
75c501251d
Revert "Merge remote-tracking branch 'naderman/load-no-providers'"
...
This reverts commit 3e85f82373
, reversing
changes made to b025d0982b
.
9 years ago
Nils Adermann
ec5416f03c
loadDev parameter is nonsense, properly load packages in create command
10 years ago
Nils Adermann
da02c53540
Update the composer repository whatprovides test to a loadrecursively test
10 years ago
Nils Adermann
090711b21c
Completely move loading of packages from composer repo to pool
10 years ago
Nils Adermann
4d0db5add6
POC Implementation of loading only explicitly named package data
10 years ago
isoroku
e0657b60a2
Fix misspellings
10 years ago
Vladimir Kartaviy
813fd0b703
Added missing $learnedWhy property
10 years ago
Nils Adermann
26598c4a9a
Remove unnecessary pool reference from rules
10 years ago
Nils Adermann
d77400ade2
Make ruleById lookup table in rule set public
...
Saves about 500k function calls on a packagist update
10 years ago
Nils Adermann
c6af09b1da
Make project id public
...
Reduction of rougly 1.3 million function calls on packagist update
10 years ago
Nils Adermann
ef41f136f8
Literals on rule are now public
...
This causes a reduction of ~500k function calls for packagist composer
update (~14 million total).
10 years ago
Jordi Boggiano
94926218e8
CS fixes
10 years ago
Jordi Boggiano
ec0463a400
Add tests for platform packages required by root and avoid creating rules altogether instead of disabling them, refs #3320
10 years ago
alu
b7fa302b90
add ignore-platform-package-requirements for update/install commands.
10 years ago
Jordi Boggiano
e23665be59
Fix replacers being picked if whatProvide was called before building the package whitelist, fixes #2991 , fixes #2962
11 years ago
Nils Adermann
5b80144ad0
Resolve job packages after whitelist generation
11 years ago
Jordi Boggiano
0a3df27403
Remove dead code, fixes #2363
11 years ago
Jordi Boggiano
0700cd9186
Adjust according to feedback
12 years ago
Jordi Boggiano
db4055b778
Put a higher prio on replacers of the same vendor as the required package
12 years ago
Jordi Boggiano
514a3cde77
CS fixes
12 years ago
Jordi Boggiano
5d78fa6ce6
Report typos in package name if no version matches
12 years ago
Pascal Borreli
83fd3967f0
Fixed PHPDoc
12 years ago
Pascal Borreli
5eead93250
Fixed typos
12 years ago
Jordi Boggiano
6a03e4f9ac
Code optimizations: Avoiding counting repeatedly
12 years ago
Nils Adermann
27d8904abe
resetToOffset method was moved to the Decisions class a while ago
12 years ago
Jordi Boggiano
ef637c8f1a
CS fixes
12 years ago
Adrien Brault
4263fe9255
Fix Solver CS
12 years ago
Nils Adermann
cc7632489d
Make problem report messages more readable
...
Added pretty strings to constraints
12 years ago
Nils Adermann
12abff8b4c
Simplify branch handling code
12 years ago
Nils Adermann
5b1a48663e
DecisionQueueFree is no longer needed
12 years ago
Nils Adermann
2fbc04b950
Make decisions countable and use foreach to iterate them in solver
12 years ago
Nils Adermann
d592c0a55e
Remove only branches on right levels in revert
12 years ago
Nils Adermann
ac762ba6e9
Correctly resolve branches if necessary
12 years ago
Nils Adermann
67fde90666
Correctly sort operations within transactions using DFS
...
Fixes #655
12 years ago