How to memorize all notes in scales (piano) so that you can easily remember the chords or notes in that particular scale???

I've been playing piano for a long time and I know all the notes in any major or minor scales but whenever I try to play something in a particular scale (let's say F major scale) it always takes a little bit time for me to figure out which chords or notes are in F major scale...I see professional or... show more I've been playing piano for a long time and I know all the notes in any major or minor scales but whenever I try to play something in a particular scale (let's say F major scale) it always takes a little bit time for me to figure out which chords or notes are in F major scale...I see professional or advanced pianist play a piece or something in any scale and they know exactly which notes or chords are in that particular scale and it doesn't take much time for them to figure out which notes are in that particular scale while playing piece....I mean how do they memorize all notes in a particular scale and I'm talking about many octaves not just one or two because in order to compose songs or pieces one should know scales in all octaves right?
3 answers 3