Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Completely rewrite excel sheet parsing #88

Merged
merged 58 commits into from
Oct 3, 2024
Merged

Commits on Aug 12, 2024

  1. Configuration menu
    Copy the full SHA
    faa1585 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    de6a8c3 View commit details
    Browse the repository at this point in the history
  3. Fix compile errors

    WorkingRobot committed Aug 12, 2024
    Configuration menu
    Copy the full SHA
    66a4d96 View commit details
    Browse the repository at this point in the history
  4. Minor doc fixes

    Soreepeong committed Aug 12, 2024
    Configuration menu
    Copy the full SHA
    64efaf8 View commit details
    Browse the repository at this point in the history

Commits on Aug 13, 2024

  1. Configuration menu
    Copy the full SHA
    27bb2e2 View commit details
    Browse the repository at this point in the history

Commits on Aug 14, 2024

  1. Fix iteration bug

    WorkingRobot committed Aug 14, 2024
    Configuration menu
    Copy the full SHA
    0fe084e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    96dceeb View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    604b7c9 View commit details
    Browse the repository at this point in the history
  4. Rewrite RSV resolution

    WorkingRobot committed Aug 14, 2024
    Configuration menu
    Copy the full SHA
    f688b05 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    6fb7725 View commit details
    Browse the repository at this point in the history
  6. Rename rsv folder

    WorkingRobot committed Aug 14, 2024
    Configuration menu
    Copy the full SHA
    db7e8b2 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    1acb0d6 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    339aea8 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    271cfde View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    a092322 View commit details
    Browse the repository at this point in the history
  11. Formatting changes

    WorkingRobot committed Aug 14, 2024
    Configuration menu
    Copy the full SHA
    c9b9bb1 View commit details
    Browse the repository at this point in the history

Commits on Aug 15, 2024

  1. Refactor RSV resolution

    Use a plain delegate instead and resolve by default
    WorkingRobot committed Aug 15, 2024
    Configuration menu
    Copy the full SHA
    fc7fb2e View commit details
    Browse the repository at this point in the history

Commits on Aug 16, 2024

  1. Some speedups

    * `IExcelRow.RowId` and `IExcelRow.SubrowId` exist to implement `ICollection<T>.Contains`.
      * `System.Collections.Generic.EnumerableHelpers.ToArray` and alike in LINQ has an optimization for `ICollection<T>`. As it requires `Contains` to be implemented, exposing `RowId` and `SubrowId` in a generic way will make it possible to implement that in O(1).
    * `ExcelSheet` constructor now preallocates lookup lookup tables.
      * `.exh` file comes with information on how many rows are there, so we know the exact number of items that needs to be allocated.
      * Using an array directly bypassing list wrappers may provide an additional speed boost.
      * In case `.exh` file contains a wrong information on number of rows, which is an unlikely case, `Array.Resize` is used to reallocate the array.
    * `ExcelSheet.UnsafeCreateRow/Subrow/At` has been added.
      * These functions assume that boundary checks are done by callers.
      * As enumerators always work inside the boundary, especially when the collection is immutable, `IEnumerator{T}.Current` can skip boundary checks.
    * `DefaultExcelSheet<T>` and `SubrowsExcelSheet<T>` has been added.
      * As sheets are usually not meaningful without knowing what is in it in the first place, it would be better to specialize for each variants.
      * This effectively hides subrow operations from sheets of default variants.
      * This removes `HasSubrows` check from getter functions.
    * Added `SubrowsExcelSheet.Try/GetRow/OrDefault` variants that returns `SubrowCollection<T>` instead.
      * This makes it convenient to iterate over subrows under one row ID.
      * This makes it faster to access multiple subrows under one row ID, as lookup operation is done on obtaining the collection. Once the collection is constructed, accessing subrows is an O(1) operation.
    * `ExcelModule.GetSheet` uses static lambda in place of `SheetCache.GetOrAdd`.
      * This will avoid heap allocation if a corresponding sheet is already loaded.
    * Named value tuples in `ExcelSheet` are replaced with `record struct`.
      * This reduces the size of each lookup element from 16 bytes to 12 bytes.
    Soreepeong committed Aug 16, 2024
    Configuration menu
    Copy the full SHA
    2f075cc View commit details
    Browse the repository at this point in the history
  2. Add row index lookup array

    Most of sheets do not have large gaps across items. That fact can be
    used to make a lookup array instead of lookup dictionary, which will
    even further reduce the time spent translating row ID to row index.
    Soreepeong committed Aug 16, 2024
    Configuration menu
    Copy the full SHA
    79c90a5 View commit details
    Browse the repository at this point in the history

Commits on Aug 17, 2024

  1. Merge pull request #1 from Soreepeong/wrl2

    Suggestions on Excel
    WorkingRobot authored Aug 17, 2024
    Configuration menu
    Copy the full SHA
    754bf9a View commit details
    Browse the repository at this point in the history
  2. Additional changes

    WorkingRobot committed Aug 17, 2024
    Configuration menu
    Copy the full SHA
    105fd19 View commit details
    Browse the repository at this point in the history
  3. Reformat code

    Soreepeong committed Aug 17, 2024
    Configuration menu
    Copy the full SHA
    0956b1f View commit details
    Browse the repository at this point in the history
  4. Correctness and documents

    * `MethodInfo.Invoke` throws `TargetInvocationException` if the method
      throws an exception; changed to handle that.
    * Added comments for some functions.
    Soreepeong committed Aug 17, 2024
    Configuration menu
    Copy the full SHA
    5af0b02 View commit details
    Browse the repository at this point in the history
  5. Set IEnumerator<T>.Current on MoveNext

    Making `IEnumerator<T>.Current` evaluate on demand can let an invalid
    value get passed to UnsafeCreate functions. Creating them on `MoveNext`
    will guarantee that UnsafeCreate functions are called only from the
    context where the preconditions are met.
    Soreepeong committed Aug 17, 2024
    Configuration menu
    Copy the full SHA
    e1c7d78 View commit details
    Browse the repository at this point in the history
  6. Extra format

    Soreepeong committed Aug 17, 2024
    Configuration menu
    Copy the full SHA
    2ad083e View commit details
    Browse the repository at this point in the history
  7. Remove unnecessary code

    Soreepeong committed Aug 17, 2024
    Configuration menu
    Copy the full SHA
    2a3cee2 View commit details
    Browse the repository at this point in the history
  8. Merge pull request #2 from Soreepeong/wrl2

    Reformat code, documentation/enumerator correctness fixes
    WorkingRobot authored Aug 17, 2024
    Configuration menu
    Copy the full SHA
    924b733 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    a82a616 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    54b7fcd View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    45fad71 View commit details
    Browse the repository at this point in the history
  12. Split IExcelRow.cs

    WorkingRobot committed Aug 17, 2024
    Configuration menu
    Copy the full SHA
    287bc57 View commit details
    Browse the repository at this point in the history
  13. Reformat code

    Soreepeong committed Aug 17, 2024
    Configuration menu
    Copy the full SHA
    349d770 View commit details
    Browse the repository at this point in the history
  14. Merge pull request #3 from Soreepeong/wrl2

    Reformat code
    WorkingRobot authored Aug 17, 2024
    Configuration menu
    Copy the full SHA
    24c7964 View commit details
    Browse the repository at this point in the history

Commits on Aug 19, 2024

  1. Configuration menu
    Copy the full SHA
    a86c80e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    71cf233 View commit details
    Browse the repository at this point in the history
  3. Make sheet name optional

    WorkingRobot committed Aug 19, 2024
    Configuration menu
    Copy the full SHA
    0b3082f View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    73a0c6f View commit details
    Browse the repository at this point in the history
  5. Merge pull request #4 from Soreepeong/wrl2

    Use constructors directly on Subrow/ExcelSheet, specialize exception
    WorkingRobot authored Aug 19, 2024
    Configuration menu
    Copy the full SHA
    4f57f67 View commit details
    Browse the repository at this point in the history
  6. Formatting changes

    WorkingRobot committed Aug 19, 2024
    Configuration menu
    Copy the full SHA
    b07aa32 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    030bfd3 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    e3a39d8 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    b70f89e View commit details
    Browse the repository at this point in the history

Commits on Aug 23, 2024

  1. Configuration menu
    Copy the full SHA
    0a13740 View commit details
    Browse the repository at this point in the history

Commits on Aug 27, 2024

  1. Configuration menu
    Copy the full SHA
    130f036 View commit details
    Browse the repository at this point in the history
  2. Fix invalid cast

    WorkingRobot committed Aug 27, 2024
    Configuration menu
    Copy the full SHA
    78a00f0 View commit details
    Browse the repository at this point in the history
  3. Add rowref benchmarks

    WorkingRobot committed Aug 27, 2024
    Configuration menu
    Copy the full SHA
    ddce871 View commit details
    Browse the repository at this point in the history

Commits on Aug 28, 2024

  1. More benchmarks

    WorkingRobot committed Aug 28, 2024
    Configuration menu
    Copy the full SHA
    6a28cd2 View commit details
    Browse the repository at this point in the history
  2. Benchmark whitespace

    WorkingRobot committed Aug 28, 2024
    Configuration menu
    Copy the full SHA
    46dbd7b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    a562e31 View commit details
    Browse the repository at this point in the history

Commits on Aug 30, 2024

  1. Configuration menu
    Copy the full SHA
    4c00073 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1de6d40 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    651599d View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    6b55c21 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    2c844d9 View commit details
    Browse the repository at this point in the history

Commits on Sep 15, 2024

  1. Configuration menu
    Copy the full SHA
    9b0aab3 View commit details
    Browse the repository at this point in the history
  2. Formatting changes

    WorkingRobot committed Sep 15, 2024
    Configuration menu
    Copy the full SHA
    843f976 View commit details
    Browse the repository at this point in the history

Commits on Sep 27, 2024

  1. Configuration menu
    Copy the full SHA
    9088fe3 View commit details
    Browse the repository at this point in the history

Commits on Sep 29, 2024

  1. Fix compiler errors

    WorkingRobot committed Sep 29, 2024
    Configuration menu
    Copy the full SHA
    2ce372a View commit details
    Browse the repository at this point in the history