google / google/draco

File size discrepancy with `du` when repeatedly encoding point clouds

Open
#1,095 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
C++
Stars
7.5k
Forks
1.1k
Avg merge
47m
Merged PRs (30d)
1

Description

## Issue Description
When repeatedly encoding point clouds using `draco_encoder` on macOS without deleting the output file between runs, `du` reports increased file sizes for subsequent runs while the actual file size remains unchanged. This occurs specifically when encoding point clouds (either directly or from PLY files with faces removed).

## Steps to Reproduce
1. Remove faces from a PLY file to create a point cloud:
```bash
sed -e '10d' -e '11d' -e '/^3 /d' testdata/bun_zipper.ply > bz_mod.ply
```

2. Run encoder multiple times without deleting output:

```bash
build_dir/draco_encoder -i bz_mod.ply -o bz_out.drc
du -h bz_out.drc # Reports 76K
build_dir/draco_encoder -i bz_mod.ply -o bz_out.drc
du -h bz_out.drc # Reports 136K
```

## Observed Behavior

* First encoding: `du` reports expected file size
* Subsequent encodings: `du` reports larger file size
* Actual file size (via `ls -l`, `stat`, etc.) remains constant
* Extended attributes (`@` flag) appear on the file
* Issue persists across repeated runs until file is deleted

## Environment
* OS: macOS 15.1
* Chip: Arm64 (M3)
* Version: 1.5.7 (recent clone from the main branch)
* Different builds tested:
* `cmake ..`
* `cmake .. -DCMAKE_BUILD_TYPE=Release -DDRACO_TESTS=ON`
* All tests pass

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.