You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sis.apache.org by de...@apache.org on 2020/12/31 09:58:55 UTC

[sis] branch geoapi-4.0 updated (b9edb1f -> ce75340)

This is an automated email from the ASF dual-hosted git repository.

desruisseaux pushed a change to branch geoapi-4.0
in repository https://gitbox.apache.org/repos/asf/sis.git.


 discard b9edb1f  Add a note about another failed attempt to optimize.
     new ce75340  Add a note about another failed attempt to optimize.

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (b9edb1f)
            \
             N -- N -- N   refs/heads/geoapi-4.0 (ce75340)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../java/org/apache/sis/internal/processing/image/IsolineTracer.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


[sis] 01/01: Add a note about another failed attempt to optimize.

Posted by de...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

desruisseaux pushed a commit to branch geoapi-4.0
in repository https://gitbox.apache.org/repos/asf/sis.git

commit ce753409cb6242dfc96632671e5cd2e8602508ed
Author: Martin Desruisseaux <ma...@geomatys.com>
AuthorDate: Thu Dec 31 10:56:33 2020 +0100

    Add a note about another failed attempt to optimize.
---
 .../internal/processing/image/IsolineTracer.java    | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/core/sis-feature/src/main/java/org/apache/sis/internal/processing/image/IsolineTracer.java b/core/sis-feature/src/main/java/org/apache/sis/internal/processing/image/IsolineTracer.java
index 364b186..ddbe362 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/internal/processing/image/IsolineTracer.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/internal/processing/image/IsolineTracer.java
@@ -267,6 +267,27 @@ final class IsolineTracer {
          */
         @SuppressWarnings("AssertWithSideEffects")
         final void interpolate() throws TransformException {
+            /*
+             * Note: `interpolateMissingLeftSide()` and `interpolateMissingTopSide(…)` should do interpolations
+             * only for cells in the first column and first row respectively. We could avoid those method calls
+             * for all other cells if we add two flags in the `isDataAbove` bitmask: FIRST_ROW and FIRST_COLUMN.
+             * The switch cases then become something like below:
+             *
+             *     case <bitmask> | FIRST_COLUMN | FIRST_ROW:
+             *     case <bitmask> | FIRST_COLUMN: {
+             *         interpolateMissingLeftSide();
+             *         // Fall through
+             *     }
+             *     case <bitmask> | FIRST_ROW:
+             *     case <bitmask>: {
+             *         // Interpolations on other borders.
+             *         break;
+             *     }
+             *
+             * We tried that approach, but benchmarking on Java 15 suggested a small performance decrease
+             * instead than an improvement. It may be worth to try again in the future, after advancement
+             * in compiler technology.
+             */
             switch (isDataAbove) {
                 default: {
                     throw new AssertionError(isDataAbove);      // Should never happen.