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
Nils Adermann
26e051cb76
Decisions are now encapsulated in a separate object
12 years ago
Jordi Boggiano
1bd4ccbd54
php-cs-fixer magic
13 years ago
Nils Adermann
21c7e219e2
Change "else if" to "elseif"
13 years ago
Nils Adermann
99200af51b
Correctly indent break statements
13 years ago
Nils Adermann
76d3950992
Document the RuleWatchGraph
13 years ago
Nils Adermann
2dfea8a5e0
Only consider undecided literals for selectAndInstall
...
Fixes #707
13 years ago
Nils Adermann
dd527a4049
Remove weak rules
...
Since we no longer have suggest/recommend rules and no longer use any update
or feature rules so packages are removed by default, we do not need weak rules
anymore.
13 years ago
Nils Adermann
025581b365
Rename walkLiteral method to more explicitly say what it does
13 years ago
Nils Adermann
451bab1c2c
Get rid of Literal object / literal id mix, use literals only to save memory
13 years ago
Nils Adermann
731a451dfe
Move handling of watch graph to separate classes
13 years ago
Nils Adermann
71ee5c8f4c
We don't have a systemsolvable at the lowest level
13 years ago
Nils Adermann
286593cf99
Move solver debugging code into solver subclass
13 years ago
Nils Adermann
46e4ae0e6a
Move rule generation from solver into separate rule set generator
13 years ago
Nils Adermann
70e306f055
Process all jobs in one method and remove lock jobs which are not used
13 years ago
Nils Adermann
3fcd042fd4
Skip adding (ignored) duplicate rules which were already added
13 years ago
Nils Adermann
1d60ae1bfc
We no longer support recommended packages, remove left over code
13 years ago
Nils Adermann
92ecf5a603
Remove unused variables
13 years ago
Nils Adermann
bd66c27ff6
We mark packages as uninstallable by removing them from the repo
...
As it is faster to remove packages from the repos and keep them out of the
package pool to begin with, we don't need an installable() method on the
policy.
13 years ago
Nils Adermann
8fc09afbae
Move transaction generation to a separate class
13 years ago
Nils Adermann
37d271271d
Turn assertions into solver bug exceptions with more info
13 years ago
Nils Adermann
0c1944a9d0
Let the solver handle aliases instead of the installer
13 years ago
Nils Adermann
15f43571b9
Rules of type feature are no longer needed
13 years ago
Nils Adermann
69b55f12ae
Call feature rules update rules, as there is no difference in composer
13 years ago
Nils Adermann
0bd6fa1f37
An array of installed packages is no longer needed in the solver
13 years ago
Nils Adermann
cf5d14e2e1
Move all solver members to top of the file
13 years ago
Nils Adermann
c51fedef8c
Policy rules cannot conflict with jobs anymore
...
As we no longer need special feature rules for updating installed packages
we don't have policy rules which might conflict with job rules anymore.
Everything is driven by jobs now.
13 years ago
Nils Adermann
5feff954a4
Remove commented out debug output
13 years ago
Nils Adermann
c37e126e14
Installed packages are now always removed unless otherwise requested
...
This means that an update request must always be accompanied by an install
request, otherwise the package might be removed rather than updated.
13 years ago
Nils Adermann
f4ae88a5d6
Create lookup table for installed packages in only one place
13 years ago
Nils Adermann
5daeacf0ac
We won't implement choice rules, you need to edit composer.json to choose
13 years ago
Nils Adermann
875261931c
We do not support any options to keep obsolete packages
13 years ago
Jordi Boggiano
f7440076fa
Revert "Merge remote-tracking branch 'naderman/remove-packages-by-default'"
...
This reverts commit 2988152602
, reversing
changes made to adb4188e12
.
13 years ago
Nils Adermann
f4d5568937
Rules of type feature are no longer needed
13 years ago
Nils Adermann
d153ab3f8f
Call feature rules update rules, as there is no difference in composer
13 years ago
Nils Adermann
f98ab2e491
An array of installed packages is no longer needed in the solver
13 years ago
Nils Adermann
7be4b82ad2
Move all solver members to top of the file
13 years ago
Nils Adermann
6410817c4e
Policy rules cannot conflict with jobs anymore
...
As we no longer need special feature rules for updating installed packages
we don't have policy rules which might conflict with job rules anymore.
Everything is driven by jobs now.
13 years ago
Nils Adermann
3618ddacb0
Remove commented out debug output
13 years ago
Nils Adermann
2cb2cde096
Installed packages are now always removed unless otherwise requested
...
This means that an update request must always be accompanied by an install
request, otherwise the package might be removed rather than updated.
13 years ago
Nils Adermann
1a48ebaf57
Create lookup table for installed packages in only one place
13 years ago
Nils Adermann
0e537b9c93
We won't implement choice rules, you need to edit composer.json to choose
13 years ago
Nils Adermann
5ba9a887c2
We do not support any options to keep obsolete packages
13 years ago
Nicolas Le Goff
3f13eb87b1
fix_typo
13 years ago
Jordi Boggiano
53191eb0fe
Remove recommend, make suggest informational, add require-dev, fixes #78 , fixes #510
13 years ago
Nils Adermann
64a451eaf9
Remove dontFix feature for local packages and explicit fix command
...
This made sense for the libzypp, so your kernel doesn't get deleted
just cause it thinks something is broken, but it doesn't really make
sense for composer.
13 years ago
Nils Adermann
a16aa68c1d
Rule literals are sorted, so first literal added is not first retrieved
...
Fixes #477
13 years ago
Nils Adermann
83123b2d40
Generate human readable explanations of rules which cause problems
13 years ago
Nils Adermann
2c87fe5a22
Collect solver problems in Problem objects with human readable output.
13 years ago
Jordi Boggiano
9ed05e09f3
Fix version_compare for ubuntu that ships with versions like 5.3.3-1 (bigger than 5.3.3)
13 years ago
Nils Adermann
17f0730e51
Levels are always > 0, negative level was just a hack in the C implementation
...
Fixes #243
13 years ago
Nils Adermann
f3ff53b17c
Create problems directly, rather than generating impossible rules
13 years ago