Grease pencil : Lag in drawing start as file gets heavier #78856

Closed
opened 2020-07-12 12:25:13 +02:00 by pranavjit virdi · 29 comments

System Information
Operating system: Windows-10-10.0.18362-SP0 64 Bits
Graphics card: GeForce GTX 1050 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 451.48
RAM: 16 gb
CPU: i7-7700HQ @ 2.80 GHz

Blender Version
Broken: version: 2.90.0 Alpha, branch: master, commit date: 2020-07-12 08:01, hash: 404486e66c

Short description of error
I have a large file, and there is a major delay in when i actually put the pen on tablet to when it actually starts drawing. On file explorer in windows it shows the file size to be somewhere around 166 mb. in blender bottom left corner it shows memory usage going up to 680 mb while drawing.

However when i delete 90% of the frames it goes back to it's normal behavior, memory usage then dropped to around 180 mb.
here is a video, (OBS further exaggerated the effect to the point where nothing appeared in fast strokes, so i had to record from mobile)
bug report.mp4
grease pencil bug.JPG
Exact steps for others to reproduce the error

drawing practice.rar

  1. open file attached (in a zip as the original file size is 166 mb)
  2. on a new keyframe, try to draw some really fast strokes, tablet or mouse, in both cases this is the issue.
    You should notice that it doesn't start where it actually should.
  3. delete a large portion of keyframes or all of them,
  4. Do the fast strokes test again, it should work as normal
**System Information** Operating system: Windows-10-10.0.18362-SP0 64 Bits Graphics card: GeForce GTX 1050 Ti/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 451.48 RAM: 16 gb CPU: i7-7700HQ @ 2.80 GHz **Blender Version** Broken: version: 2.90.0 Alpha, branch: master, commit date: 2020-07-12 08:01, hash: `404486e66c` **Short description of error** I have a large file, and there is a major delay in when i actually put the pen on tablet to when it actually starts drawing. On file explorer in windows it shows the file size to be somewhere around 166 mb. in blender bottom left corner it shows memory usage going up to 680 mb while drawing. However when i delete 90% of the frames it goes back to it's normal behavior, memory usage then dropped to around 180 mb. here is a video, (OBS further exaggerated the effect to the point where nothing appeared in fast strokes, so i had to record from mobile) [bug report.mp4](https://archive.blender.org/developer/F8688581/bug_report.mp4) ![grease pencil bug.JPG](https://archive.blender.org/developer/F8688607/grease_pencil_bug.JPG) **Exact steps for others to reproduce the error** [drawing practice.rar](https://archive.blender.org/developer/F8688595/drawing_practice.rar) 1. open file attached (in a zip as the original file size is 166 mb) 2. on a new keyframe, try to draw some really fast strokes, tablet or mouse, in both cases this is the issue. You should notice that it doesn't start where it actually should. 3. delete a large portion of keyframes or all of them, 4. Do the fast strokes test again, it should work as normal

Added subscriber: @PranavjitVirdi

Added subscriber: @PranavjitVirdi

Added subscriber: @iss

Added subscriber: @iss

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'

I can reproduce using mouse and clicking furiously.

I can reproduce using mouse and clicking furiously.

Added subscribers: @pepe-school-land, @antoniov

Added subscribers: @pepe-school-land, @antoniov

I cannot reproduce on my Windows System using the mouse. @pepe-school-land can you reproduce it?

Edit: I have tested with my Wacom tablet and I cannot reproduce either.

I cannot reproduce on my Windows System using the mouse. @pepe-school-land can you reproduce it? Edit: I have tested with my Wacom tablet and I cannot reproduce either.

Added subscriber: @PrototypeNM1

Added subscriber: @PrototypeNM1

@PranavjitVirdi can you reproduce the issue in this build ?

@PranavjitVirdi can you reproduce the issue in [this build ](https://blender.community/c/graphicall/Wlbbbc/)?

Changed status from 'Confirmed' to: 'Needs User Info'

Changed status from 'Confirmed' to: 'Needs User Info'

In #78856#1038965, @PrototypeNM1 wrote:
@PranavjitVirdi can you reproduce the issue in this build ?

Hello, i just tested on the latest build and the one you linked, the problem persists.

> In #78856#1038965, @PrototypeNM1 wrote: > @PranavjitVirdi can you reproduce the issue in [this build ](https://blender.community/c/graphicall/Wlbbbc/)? Hello, i just tested on the latest build and the one you linked, the problem persists.

For the same build, is the issue present if you change the Tablet API (Preferences > Input > Tablet > Tablet API) to Windows Ink? Same for Wintab?

For the same build, is the issue present if you change the Tablet API (Preferences > Input > Tablet > Tablet API) to Windows Ink? Same for Wintab?
Nicholas Rishel self-assigned this 2020-10-31 03:08:55 +01:00

Hello, in that build that you linked the windows ink performs better but there is still a delay
bug 1.png

Hello, in that build that you linked the windows ink performs better but there is still a delay ![bug 1.png](https://archive.blender.org/developer/F9148563/bug_1.png)
Nicholas Rishel removed their assignment 2020-11-02 09:26:24 +01:00

@antoniov I've seen the same behavior when running debug builds. The issue is likely that some input is lost when not retrieved from the OS fast enough.

If the delay is not reasonable for the file size and system spec this indicates that grease pencil handling is taking longer to run with large file sizes.
If the delay is reasonable then I suspect separating OS input and Blender internal processing onto separate threads would help.

@antoniov I've seen the same behavior when running debug builds. The issue is likely that some input is lost when not retrieved from the OS fast enough. If the delay is not reasonable for the file size and system spec this indicates that grease pencil handling is taking longer to run with large file sizes. If the delay is reasonable then I suspect separating OS input and Blender internal processing onto separate threads would help.

@PranavjitVirdi is there only lag at the start of the line, or do you have e.g. jagged lines if you keep drawing in circles for a few seconds?

@PranavjitVirdi is there only lag at the start of the line, or do you have e.g. jagged lines if you keep drawing in circles for a few seconds?

it's only at the start of the line, however i noticed something else.

how much time before i end the last stroke has more influence than how fast the stroke is.

if i draw a bunch of strokes (any shape) in very quick succession one after the other (try drawing a dotted line really fast). then the lag is significant, however if i wait a second (more like half a second) before starting the next stroke the lag is barely noticeable.

on the cursor on the screen i notice the drawing cursor staying at the end of the stroke for a little bit longer before it updates to the pens actual location.

it's only at the start of the line, however i noticed something else. how much time before i end the last stroke has more influence than how fast the stroke is. if i draw a bunch of strokes (any shape) in very quick succession one after the other (try drawing a dotted line really fast). then the lag is significant, however if i wait a second (more like half a second) before starting the next stroke the lag is barely noticeable. on the cursor on the screen i notice the drawing cursor staying at the end of the stroke for a little bit longer before it updates to the pens actual location.

i tested this on the build that you linked.
bug 2.png

i tested this on the build that you linked. ![bug 2.png](https://archive.blender.org/developer/F9172066/bug_2.png)

Can you recreate the with gap time test, but between lines move the pen off to a corner of the screen before drawing, and when you go to draw? And when you bring the pen back to draw do so quickly, don't let it hover over the begin point.

Can you recreate the `with gap time` test, but between lines move the pen off to a corner of the screen before drawing, and when you go to draw? And when you bring the pen back to draw do so quickly, don't let it hover over the begin point.

In #78856#1046599, @PrototypeNM1 wrote:
Can you recreate the with gap time test, but between lines move the pen off to a corner of the screen before drawing, and when you go to draw? And when you bring the pen back to draw do so quickly, don't let it hover over the begin point.

i did the test, like you said, i don't think moving the cursor to a corner makes any difference, the results were the same.

> In #78856#1046599, @PrototypeNM1 wrote: > Can you recreate the `with gap time` test, but between lines move the pen off to a corner of the screen before drawing, and when you go to draw? And when you bring the pen back to draw do so quickly, don't let it hover over the begin point. i did the test, like you said, i don't think moving the cursor to a corner makes any difference, the results were the same.
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

@PrototypeNM1 : still got an idea on how to proceed here?

@PrototypeNM1 : still got an idea on how to proceed here?

@lichtwerk no but I haven't given it much thought yet. Bugs related to the wintab merge have priority over pre-existing bugs for the time being.

@lichtwerk no but I haven't given it much thought yet. Bugs related to the wintab merge have priority over pre-existing bugs for the time being.

Added subscriber: @iamstories

Added subscriber: @iamstories

I get a very similar issue. The strokes lag in much the same way. The difference is that it has no correlation to the size of the file. It simply starts happening after drawing for a bit. Even the time it starts seems to vary. It could be with one frame or multiple, it starts lagging after a few minutes. I have only started getting the error as recent as a couple of weeks back. I have tried reinstalling Blender and even reinstalling Windows and all the drivers.

I get a very similar issue. The strokes lag in much the same way. The difference is that it has no correlation to the size of the file. It simply starts happening after drawing for a bit. Even the time it starts seems to vary. It could be with one frame or multiple, it starts lagging after a few minutes. I have only started getting the error as recent as a couple of weeks back. I have tried reinstalling Blender and even reinstalling Windows and all the drivers.

@PranavjitVirdi I recently merged some significant changes to Wintab, could you check if the issue is still present in the daily build ?

@PranavjitVirdi I recently merged some significant changes to Wintab, could you check if the issue is still present in the [daily build ](https://builder.blender.org/download/)?
Nicholas Rishel self-assigned this 2020-12-27 06:15:30 +01:00

Hello, i've done as you said and it has really really improved! there is still a very perceptible lag of the cursor, you lose it as soon as you go fast, but the input is on point.
bug 3.png

also, i recently cleared my c drive as it was close to being full, i cleared about 20 GBs and blender has been running smooth since, so could that have been a factor?

Hello, i've done as you said and it has really really improved! there is still a very perceptible lag of the cursor, you lose it as soon as you go fast, but the input is on point. ![bug 3.png](https://archive.blender.org/developer/F9532019/bug_3.png) also, i recently cleared my c drive as it was close to being full, i cleared about 20 GBs and blender has been running smooth since, so could that have been a factor?

Glad to hear. :) The cursor lag sounds like you have a system that's struggling to keep up. It sounds like the remainder of the problem is outside of Blender's scope, so I'll go ahead and close the issue.

If you want to follow up on your question wrt cleaning the C drive making things run smoother, this should be a good starting point.

Glad to hear. :) The cursor lag sounds like you have a system that's struggling to keep up. It sounds like the remainder of the problem is outside of Blender's scope, so I'll go ahead and close the issue. If you want to follow up on your question wrt cleaning the C drive making things run smoother, [this ](https://superuser.com/questions/903579/why-does-emptying-disk-space-speed-up-computers) should be a good starting point.

Changed status from 'Needs User Info' to: 'Resolved'

Changed status from 'Needs User Info' to: 'Resolved'

i went back and tested on 2.83 just to be sure that it wasn't my c-drive causing the issue, and the problem was still there. Thank you for fixing this bug!

i went back and tested on 2.83 just to be sure that it wasn't my c-drive causing the issue, and the problem was still there. Thank you for fixing this bug!

@PrototypeNM1 It's fixed the issue at my end as well. Thanks a lot for fixing it!

@PrototypeNM1 It's fixed the issue at my end as well. Thanks a lot for fixing it!
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
6 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#78856
No description provided.