Java 2D图形与ccSvcHst.exe之间的交互

Java 2D图形与ccSvcHst.exe之间的交互,java,graphics2d,Java,Graphics2d,我的第一个问题贴在这里,所以我请求原谅我的问题格式缺乏经验 我的2D图形游戏通常在我的系统上运行良好。但是当Norton Internet Security的ccSvcHst.exe进程以非常高的CPU利用率运行时,它会与游戏进行奇怪的交互。我已经确定了受到影响的特定Java代码行 // Graphics setup, just trying to give some background GraphicsEnvironment e = GraphicsEnvironment.getLocalG

我的第一个问题贴在这里,所以我请求原谅我的问题格式缺乏经验

我的2D图形游戏通常在我的系统上运行良好。但是当Norton Internet Security的ccSvcHst.exe进程以非常高的CPU利用率运行时,它会与游戏进行奇怪的交互。我已经确定了受到影响的特定Java代码行

// Graphics setup, just trying to give some background
GraphicsEnvironment e = GraphicsEnvironment.getLocalGraphicsEnvironment();
GraphicsDevice device = e.getDefaultScreenDevice();
GraphicsConfiguration grafConf = device.getDefaultConfiguration(); 
Frame f = new JFrame(grafConf);
device.setFullScreenWindow(f);
f.createBufferStrategy(2);
BufferStrategy buffStrat = f.getBufferStrategy();
Graphics grafx = buffStrat.getDrawGraphics();

// Create some sprites to draw here...

// Launch a game loop to execute every 15ms
Timer timer = new Timer();
TimerTask task = new TimerTask() { public void run() { gameLoop(); }};
timer.schedule(task,0,15);

public void gameLoop() {
    BufferedImage erase = getEraseBI();
    // Erase each the 64x64 sprites...
    int x, y; x = getX(1); y = getY(1);
    long t1start = System.currentTimeMillis();
    grafx.drawImage(erase, x, y, null);
    long t1end = System.currentTimeMillis();
    x = getX(2); y = getY(2);
    long t2start = System.currentTimeMillis();
    grafx.drawImage(erase, x, y, null);
    long t2end = System.currentTimeMillis();
    // and so on, for each sprite to erase

    // Move stuff and redraw it; no problems here...

    // Now flip the page to show what we’ve drawn
    long show1 = System.currentTimeMillis();
    buffStrat.show();
    long show2 = System.currentTimeMillis();
    grafx.dispose();
    grafx = buffStrat.getDrawGraphics();
}
通常,drawImage()和buffStrat.show()调用的执行速度非常快,两次调用之间的差值显示为0。但几分钟后,当有十几个精灵需要擦除时,一个或多个drawImage()调用(但不是全部)以及buffStrat.show()调用突然需要25-35毫秒,而不是0。此行为持续到游戏停止。重新启动系统将清除高CPU ccSvcHst状态,恢复正常、稳定、连续玩3小时而不出现任何问题的游戏性能

我不想就Norton工具的优点进行政治讨论,我只是好奇——有没有其他人看到Java graphics和NIS ccSvcHst.exe之间的这种交互