introduce subclass for delta-search
- Nov 23, 2023
-
-
Pierre-Yves David authored
Having more information is better, so we pass it directly.
99869dcf3ba0
-
- Jan 07, 2024
-
-
Pierre-Yves David authored
Lets move the specialized code in the specialized class.
a224ce5694b3 -
Pierre-Yves David authored
Lets move the specialized code in the specialized class.
383e99f6bc99 -
Pierre-Yves David authored
We now have things sliced small enough to have two class that use different `_iter_groups` implementation to encode their different logic. The filtering code remains to be moved, but I would rather keep this changeset simple and move them in the next.
d7e2acdd50ba
-
- Nov 23, 2023
-
-
Pierre-Yves David authored
The refining logic only applies to the snapshot logic, and this is now all contained in a dedicated method. Along the way, we drop the refined_groups // raw_groups layer as they no longer make sense. The result is a more explicit `iter_groups` method. This conclude the splitting and simplification of the groups generation. We are now ready to dispatch this in more diverse classes.
701caeabbee7 -
Pierre-Yves David authored
That logic is complicated enough that is is worth puting in its own function. Another method will be introduced in the next changeset to deal with the actual refining.
fac6038b11f5 -
Pierre-Yves David authored
After splitting the filtering, and with the `_candidate_groups` layer removed, we can start splitting the group generation too. This helps to organize this code and make it easier to modifying the future.
94fe4474b053 -
Pierre-Yves David authored
After splitting the filtering, and with the `_candidate_groups` layer removed, we can start splitting the group generation too. This helps to organize this code and make it easier to modifying the future.
5cc04a6da19d
-
- Jan 07, 2024
-
-
Pierre-Yves David authored
We can remove this from the general logic path and directly deal with this corner case early. This result in a small change in test-generaldelta.t as it turns out that: - at commit time we (sometimes) precompute a delta against p1 and pass it as the cached delta. - since cached delta where going through the same filtering as everything, we could "optimize" the base if it applied to an empty delta, resulting in not using the pre-computed delta. The simpler logic fix the second item, making the cached delta base always actually tested when requested. Note that the computation of a fast delta against p1 only is questionable, but looking into that is out of scope for this series.
7083b33a2699 -
Pierre-Yves David authored
We have enough pieces to remove this generator and directly bear it load using the underlying object.
bbbfa00d1e67 -
Pierre-Yves David authored
This avoid assuming a changeset is a snapshot when it is actually something simpler.
670e68729aa7 -
Pierre-Yves David authored
Being more explicit about what we are doing is going to be useful. We actually start making use of it in later changesets.
cc806f20d756
-
- Nov 23, 2023
-
-
Pierre-Yves David authored
Seems like it was never put to use, so lets simply remove it for now.
d58e14262587
-
- Jan 07, 2024
-
-
Pierre-Yves David authored
For now, we introduce some very simple variant, but they are still useful to display how having the class can helps keeping the simple case simple and their special case out of more advanced logic.
555826073625 -
Pierre-Yves David authored
This prepare the introduction of specialized the class in the next changesets.
2a333d791ecf -
Pierre-Yves David authored
Since the function is all about snapshot, we can safely use an early return and make the result simpler.
866ab9f447d4
-
- Jan 06, 2024
-
-
Pierre-Yves David authored
Nothing change except the code location. This greatly helps readability of the next future diff,
f3f35b37f4b2
-
- Jan 04, 2024
-
-
Pierre-Yves David authored
Same logic as for candidate filtering, we group code into related sub method. This will help clarifying later patches as some logic is pre-splitted
5c0693553cb6 -
Pierre-Yves David authored
We move the comment closer to the code it describ and we compute an intermediate value without using the `textlen` variable, as it will stop being defined in a future patch. This will clarify future patches.
410afe5b13fc -
Pierre-Yves David authored
This will clarify future patches by regrouping related logic before larger movement.
176d530f59af -
Pierre-Yves David authored
Since `_pre_filter_rev` contains logic from various sources of constraint, we start splitting is in subfunction to clarify and document the grouping.
1ea56b10dd4a -
Pierre-Yves David authored
Since `_pre_filter_rev` contains logic from various sources of constraint, we start splitting is in subfunction to clarify and document the grouping.
9a1239c362ae
-
- Nov 23, 2023
-
-
Pierre-Yves David authored
Since `_pre_filter_rev` contains logic from various sources of constraint, we start splitting is in subfunction to clarify and document the grouping.
2407af4f2eea
-
- Jan 04, 2024
-
-
Pierre-Yves David authored
Now that the complicated change is made, we can do the noisy one.
ac8b798e602b
-
- Nov 23, 2023
-
-
Pierre-Yves David authored
This goes one step further than the previous change by making the pre-filtering of individual candicates revision in its own function. This will allow subclass to easily configure this filtering with their own constrains. The `if True:` part help the readability of this diff a lot and will be drop in to the next changesets.
898c212e1b2f -
Pierre-Yves David authored
This organise the code further and open the way to specialization via sub-classing. Something important for the coming changes.
02cc19f4f091
-
- Dec 29, 2023
-
-
Pierre-Yves David authored
We use more explicit function call. This make operations more explicit and will make future refactoring simpler.
d0d869fccd20
-
- Nov 23, 2023
-
-
Pierre-Yves David authored
This will help do distinct full snapshot (level 0) and normal delta (not a snapshot, no snapshot level)
0d92d62ecde0 -
Pierre-Yves David authored
The previous computation was "wrong" it always used the tiprev, even when computing a delta in a non-append case (mostly benchmark). This never produced wrong delta on disk, but would misled debug or performance command. Since it does not have any actual user impact, I did not put this on stable. With the code fixed we can now use revisions in some search and it makes the test display more interesting behavior since the algorithm has more to work with.
2e169a222e63
-
- Dec 22, 2023
-
-
Pierre-Yves David authored
There is a lot of format specific code in `is_good_delta_info`, moving it on _DeltaSearch will allow to split this into subclass soon.
7455cae67260 -
Pierre-Yves David authored
The revinfo has more information and will allow for even more function to be turned into method.
49401b7dec0c
-
- Nov 23, 2023
-
-
Pierre-Yves David authored
This clarify the content of these attributes.
398a105b16a0 -
Pierre-Yves David authored
Since the `_one_dbg_data` method is meant to create a valid debug dictionnary. We can as well prefill the relevant value to reduce the amount of debug code in the main code.
46415df4eb1c -
Pierre-Yves David authored
More explanations is always good.
a4af7507fa4b -
Pierre-Yves David authored
Now that we have an object we can initialize that attribute at initialization time. This will make it available for more method in the future, allowing to split the code.
01db705bbe32
-
- Nov 20, 2023
-
-
Pierre-Yves David authored
Now that we have an object we can check that DELTA_BASE_REUSE_FORCE cases does not reach this code at in a more suitable location.
c9ab452e5611 -
Pierre-Yves David authored
Now that we have an object we can initialize that attribute at initialization time.
047358417d01 -
Pierre-Yves David authored
Now that we have an object we can initialize that attribute at initialization time.
87fce139e927 -
Pierre-Yves David authored
Moving more code before doing more logic changes.
a227e061bb4b -
Pierre-Yves David authored
Moving more code before doing more logic changes.
c83074405276 -
Pierre-Yves David authored
That object represent the search of a good delta for one revision. It will replace the interleaved generator currently in use. It will make the logic more explicit and easier to split into different subclass for the algorithm variant. We will move content gradually before doing deeper rework. For now, we only move the `_candidategroups` function here. More will follow in the same series.
c82e03b102a6
-
- Dec 22, 2023
-
-
Pierre-Yves David authored
As we are about to introduce another object related to finding delta. So lets have a minimal docstring to the existing one.
da7ecb4deaec
-