ITADN

Check for changes before saving data.json

#797Openvictorwoo 创建于 2026-01-12
enhancement
V
victorwoocommented
### ⚠️ Please check that this feature request hasn't been suggested before. - [x] I searched previous [Issues](https://github.com/ivan-lednev/obsidian-day-planner/issues?q=is%3Aissue+is%3Aopen) didn't find any similar feature requests. - [x] I am only requesting a single feature. Multiple changes should be split into individual requests, with links between them. - [x] I believe my requested feature will be generally applicable to other users, not just me: it is not uniquely tied to my personal workflow. ### 🔖 Feature description I found that the `obsidian-day-planner` plugin writes to the `.obsidian/plugins/obsidian-day-planner/data.json` file every minute, even if the content remains unchanged. This causes the sync software to keep syncing continuously. This leads to a large number of logs and sometimes causes read/write conflicts. As shown in the following code, there is no constantly changing content in `data.json`. ```json { "snapStepMinutes": 10, "progressIndicator": "pie", "showTaskNotification": true, "zoomLevel": 2, "timelineIcon": "calendar-range", "endLabel": "All done", "startHour": 6, "timelineDateFormat": "YYYY-MM-DD", "centerNeedle": false, "plannerHeading": "Day planner", "plannerHeadingLevel": 1, "timelineColored": false, "timelineStartColor": "#006466", "timelineEndColor": "#4d194d", "timestampFormat": "HH:mm", "hourFormat": "H", "dataviewSource": "", "extendDurationUntilNext": false, "defaultDurationMinutes": 30, "minimalDurationMinutes": 10, "showTimestampInTaskBlock": false, "showUncheduledTasks": true, "showUnscheduledNestedTasks": true, "showNow": true, "showNext": true, "pluginVersion": "0.28.0", "showCompletedTasks": true, "showSubtasksInTaskBlocks": true, "icals": [], "colorOverrides": [], "releaseNotes": false, "taskStatusOnCreation": " ", "eventFormatOnCreation": "task", "sortTasksInPlanAfterEdit": false, "firstDayOfWeek": "monday", "multiDayRange": "3-days", "showTimeTracker": false, "showActiveClocks": false, "rawIcals": [] } ``` ### ✔️ Solution I suggest that the plugin check the file content before writing to `data.json`. If there is no change in the file content, please do not write to the file. Thank you! ### ❓ Alternatives _No response_ ### 📝 Additional Context <img width="1912" height="847" alt="Image" src="https://github.com/user-attachments/assets/5c54cef6-75b4-4c57-843d-9e68b18512c0" />
0 条评论