From: Sean P. <sea...@ma...> - 2016-01-22 04:47:17
|
Hi cee1, You might move this to an issue on github. Manipulating a list would require an index or search and a fair amount of machinery. Two simpler fixes - 1) Declare priority_t as int64_t. At 60 transactions per/second that gives you 4 billion years before overflow. 2) Rewrite the priorities and priority_high_m and _low_m after the sort() in flow (2) could be done only if high or low exceeds some threshold but I don't think I'd include that optimization without some measurements to show value. You could also not increment high or low if the cell be set is already at the limit - but that seems like an unnecessary pessimization for only theoretical safety, Send me a PR for either! Sean On Thu, Jan 21, 2016 at 6:32 PM, cee1 <fy...@gm...> wrote: > Hi all, > > I notice each time touch/set a cell, priority_high_m is increased and > its value is assigned to > cell's priority_m field. > > So theoretically, it's possible to overflow priority_high_m, right? E.g. > > Considering in an automated UI test, (only) a text entry is frequently > updated, the priority_m of the backed cell is continuously increased, > and will finally overflow. > > The priority_m is (only) used in flow(): to sort the cells, and > process the relations attached to a cell one by one, right? > In other words, only the sequence is cared, not the distance. > > > So what about maintaining a `priority list', if a cell is touched/set, > move to .begin() ? > > Moreover, it may change type of the priority_m to a pointer of `link > node of the list', then if a cell is touched/set, it will be unlinked, > and reinserted to .begin() quickly. > > > > -- > Regards, > > - cee1 > > > ------------------------------------------------------------------------------ > Site24x7 APM Insight: Get Deep Visibility into Application Performance > APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month > Monitor end-to-end web transactions and take corrective actions now > Troubleshoot faster and improve end-user experience. Signup Now! > http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140 > _______________________________________________ > Adobe-source-devel mailing list > Ado...@li... > https://lists.sourceforge.net/lists/listinfo/adobe-source-devel > |