OpenWrt Forum Archive

Topic: Why do you need to save changes and then apply changes in webif?

The content of this topic has been archived on 22 Jan 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Why do you need to save changes and then apply changes in webif? I'm not the most brilliant programmer nor am I well versed in haserl or the whole webif system for that matter but, it seems to me that having one button save and apply the changes is actually easier to code than having two buttons. It's definitely easier to use.

I am far from an extpert too ...
... but i would say this is done to avoid uneccesary wear on the flash mem.
as batch of changes can thus be saved in a single flash write operation.

Noel

That may be but it's still kinda dumb. How many times can you write to a sector 100,000  times 1,000,000,  times 2,000,000 times. I don't know but I'm sure it's a lot. Writing 4 or 5 times instead of once makes almost no difference. I would rather take the performance hit and have the ease of use.

bigdan,

I'd say you're in the minority here. One of the reasons Kamikaze departed from simulated nvram and adopted it's non-compatible file system was to improve the longevity of the flash memory.

Rob

I am not an OpenWrt code expert too, but I would say that Webif has to be compatible with both WhiteRussian (which uses nvram) and Kamikaze.
In WhiteRussian, to edit the configuration using ssh, you first had to make your changes, and then type "nvram commit".
I think that's a reasonable way to work. In the most critical systems, you have to commit your changes. In OpenWrt, a bad configuration would brick your AP.
I think that's the best way to work for the general user.

(Last edited by ggp81 on 10 Jul 2007, 14:42)

The discussion might have continued from here.