|
From: Ethan M. <merritt@u.washington.edu> - 2012-09-30 00:08:19
|
On Saturday, 29 September 2012, Dima Kogan wrote: > Hi! > > > On Sat, 29 Sep 2012 11:44:09 -0700 > > "sfeam (Ethan Merritt)" <eam...@gm...> wrote: > > > > On Saturday, 29 September 2012, Dima Kogan wrote: > > > > On Fri, 28 Sep 2012 10:37:06 -0700 > > 1) The output of the ascii version is hugely redundant. Most of the > > successive V commands are identical because the vectors are shorter > > than the resolution of the plot coordinates. If this were a common > > thing we would do well to add a filtering step in x11.trm so that > > a new "V" command is only sent if it differs from the previous command. > > For example running the ascii output through "uniq" reduces the file > > size by a factor of 7, with a speed increase of 50x(!!) running > > through gnuplot_x11. > > Sounds great. Should I do this, or do you want to? I will look into it. > > 3) I worry that the binary code might not work on all supported > > platforms. Since it's just a few lines of code, I suggest that rather > > than replacing the existing 'V' command we add a parallel command > > 'B' for the bainry version. In x11.trm the choice between using 'V' > > or 'B' could be a compile-time option. We can default to the binary > > version, but anyone having problems with it could revert to the old > > ascii version with a configuration flag. > > My preference would be to switch entirely so that the amount of code being > maintained doesn't grow, but you're the boss. :) I am inclined to let both sit in CVS while we test. If no problems turn up with the binary version we can remove the old ascii code before release. > Keeping track of all the patches, proposals, the following are currently being > considered: > > 1. Patch for variable-width, space-separated fields to allow 5-digit values Merged yesterday. > 2. Missing legend label with tall windows. Caused by the 'if (x < 10000 && y < > 10000)' test in x11.trm. Removing this test entirely seems to work for the > most part. ... should be removed entirely. Merged yesterday. > 3. Dead code such as the 'else if (*buffer == X11_GR_FILLED_POLYGON)' block. Merged yesterday. > 4. strtolstrtol() instead of scanf() sounds like an easy win. Can you think of > any reason to NOT make that change? Only that you are in the process of replacing it altogether with a binary version :-) But if it's a win for 'V' it's almost certainly a win everywhere else as well. > 5. Adding default window size to the inboard x11 driver so that the 'terminal > xlib' produces plots that have decent defaults when sent to the outboard > driver manually. I'll do this. OK. It's not just xlib, however. I think (not 100% sure) that the same problem arises whenever (ipc_back_fd == IPC_BACK_UNUSABLE), e.g. x11 output from a script run non-interactively. > 6. Removing duplicate messages (such as duplicate consecutive V commands) sounds > great. We should do it OK. Low priority because it's relatively rare for normal plots. > 7. General thoughts about speeding up the inboard -> outboard link by making > some things binary. I like binary. Making this switch will probably make some > things break at first, but it'll likely be worth it. If we're touching that > at all, more radical methods may be better. For instance, instead of a V > command for each point, we could have a V command that predeclares a long > stream of points. We do. That's what the X11_POLYLINE code is for. Ethan |