Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Efficient coupling/decoupling of serialized data

by samtregar (Abbot)
on Jun 24, 2002 at 17:04 UTC ( #176858=note: print w/replies, xml ) Need Help??


in reply to Efficient coupling/decoupling of serialized data

Why deserialize it at all? Just treat it as a number. If the serial is <= the current YYYYMMDD01 then you know that at least a day has passed, so replace it. If not then ++ the serial. It's always faster not to parse at all!

-sam

  • Comment on Re: Efficient coupling/decoupling of serialized data

Replies are listed 'Best First'.
Re: Re: Efficient coupling/decoupling of serialized data
by PrakashK (Pilgrim) on Jun 24, 2002 at 22:02 UTC
    ++ the serial
    Just as long as there are no more than 99 versions in a day.

    /prakash

    Update: Of course, your numbering scheme itself breaks if there are more than 99 versions, so my comment above is not really valid.

      Nothing terrible happens if there are, it just rolls to the next day. 2002010199 becomes 2002010200. The algorithm still works - it's just the humans that get nervous about having a serial number of 2002010200 on Jan 1, 2002.

      -sam

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://176858]
help
Chatterbox?
SuicideJunkie replaces stale cookies with fresh on the platter on the sideboard.
[SuicideJunkie]: So, possibly interesting thing; I had that script which was using more than all the ram to open an absurdly large spreadsheet. I set it up to spin overnight nightly, so it stopped releasing memory since it was never fully exited.
[SuicideJunkie]: Didn't expect that to be a problem. There's plenty of disk space for swap, and the memory space would be reused the next day. But apparently virtualbox dies with a guru meditation when there's no physical memory unused on start.

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2017-04-26 22:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (491 votes). Check out past polls.